NAME

cache - ImageMagick Pixel Cache Methods


SYNOPSIS

PixelPacket * GetPixelCache( Image *image, const int x, const int y, const unsigned int columns, const unsigned int rows );

unsigned int ReadPixelCache( Image *image, const QuantumTypes quantum, const unsigned char *source );

PixelPacket * SetPixelCache( Image *image, const int x, const int y, const unsigned int columns, const unsigned int rows );

unsigned int SyncPixelCache( Image *image );

unsigned int WritePixelCache( Image *, const QuantumTypes quantum, unsigned char *destination );


FUNCTION DESCRIPTIONS


GetPixelCache

Method GetPixelCache gets pixels from the in-memory or disk pixel cache as defined by the geometry parameters. A pointer to the pixels is returned if the pixels are transferred, otherwise a NULL is returned.

The format of the GetPixelCache method is:

PixelPacket *GetPixelCache ( Image *image, const int x, const int y, const unsigned int columns, const unsigned int rows );

A description of each parameter follows:

status:

Method GetPixelCache returns a pointer to the pixels is returned if the pixels are transferred, otherwise a NULL is returned.

image:

The address of a structure of type Image.

x,y,columns,rows:

These values define the perimeter of a region of pixels.


ReadPixelCache

Method ReadPixelCache transfers one or more pixel components from a buffer or file into the image pixel buffer of an image. It returns True if the pixels are successfully transferred, otherwise False.

The format of the ReadPixelCache method is:

unsigned int ReadPixelCache ( Image *image, const QuantumTypes quantum, const unsigned char *source );

A description of each parameter follows:

status:

Method ReadPixelCache returns True if the pixels are successfully transferred, otherwise False.

image:

The address of a structure of type Image.

quantum:

Declare which pixel components to transfer (red, green, blue, opacity, RGB, or RGBA).

source:

The pixel components are transferred from this buffer.


SetPixelCache

Method SetPixelCache allocates an area to store image pixels as defined by the region rectangle and returns a pointer to the area. This area is subsequently transferred from the pixel cache with the SyncPixelCache. A pointer to the pixels is returned if the pixels are transferred, otherwise a NULL is returned.

The format of the SetPixelCache method is:

PixelPacket *SetPixelCache ( Image *image, const int x, const int y, const unsigned int columns, const unsigned int rows );

A description of each parameter follows:

status:

Method SetPixelCache returns a pointer to the pixels is returned if the pixels are transferred, otherwise a NULL is returned.

image:

The address of a structure of type Image.

x,y,columns,rows:

These values define the perimeter of a region of pixels.


SyncPixelCache

Method SyncPixelCache saves the image pixels to the in-memory or disk cache. The method returns True if the pixel region is set, otherwise False.

The format of the SyncPixelCache method is:

unsigned int SyncPixelCache ( Image *image );

A description of each parameter follows:

status:

Method SyncPixelCache returns True if the image pixels are transferred to the in-memory or disk cache otherwise False.

image:

The address of a structure of type Image.


WritePixelCache

Method WritePixelCache transfers one or more pixel components from the image pixel buffer to a buffer or file. It returns True if the pixels are successfully transferred, otherwise False.

The format of the WritePixelCache method is:

unsigned int WritePixelCache ( Image *, const QuantumTypes quantum, unsigned char *destination );

A description of each parameter follows:

status:

Method WritePixelCache returns True if the pixels are successfully transferred, otherwise False.

image:

The address of a structure of type Image.

quantum:

Declare which pixel components to transfer (red, green, blue, opacity, RGB, or RGBA).

destination:

The components are transferred to this buffer.