GraphicsMagick

- Home
- Project
- Download
- Install
- Source
- News
- Bugs
- Utilities
- Programming
- Reference

# texture

## Image texture functions

Contents

- ConstituteTextureImage
- TextureImage

# ConstituteTextureImage

## Synopsis

    Image *ConstituteTextureImage( unsigned long columns, unsigned long rows,
                                   const Image *texture, ExceptionInfo *exception );

## Description

ConstituteTextureImage() returns a new image canvas based on repeatedly tiling the texture image across and down the new image canvas. The returned image properties are similar to the texture image properties.

The format of the TextureImage method is:

    Image *ConstituteTextureImage( unsigned long columns, unsigned long rows,
                                   const Image *texture, ExceptionInfo *exception );

columns:
  The number of columns in the new image.
rows:
  The number of rows in the new image.
texture:
  The texture image to layer on the background.
exceptions:
  Any errors are reported here.

# TextureImage

## Synopsis

    MagickPassFail TextureImage( Image *image, const Image *texture );

## Description

TextureImage() repeatedly tiles the texture image across and down the image canvas. If the image canvas includes a matte channel, then the tile is alpha-composited "under" the image and the matte channel is removed. MagickFail is returned if an error is encountered.

The format of the TextureImage method is:

    MagickPassFail TextureImage( Image *image, const Image *texture );

A description of each parameter follows:

image:
  The image.
texture:
  This image is the texture to layer on the background.