cache - ImageMagick Pixel Cache Methods
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
);
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:
Method GetPixelCache returns a pointer to the pixels is returned if the pixels are transferred, otherwise a NULL is returned.
The address of a structure of type Image.
These values define the perimeter of a region of pixels.
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:
Method ReadPixelCache returns True if the pixels are successfully transferred, otherwise False.
The address of a structure of type Image.
Declare which pixel components to transfer (red, green, blue, opacity, RGB, or RGBA).
The pixel components are transferred from this buffer.
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:
Method SetPixelCache returns a pointer to the pixels is returned if the pixels are transferred, otherwise a NULL is returned.
The address of a structure of type Image.
These values define the perimeter of a region of pixels.
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:
Method SyncPixelCache returns True if the image pixels are transferred to the in-memory or disk cache otherwise False.
The address of a structure of type Image.
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:
Method WritePixelCache returns True if the pixels are successfully transferred, otherwise False.
The address of a structure of type Image.
Declare which pixel components to transfer (red, green, blue, opacity, RGB, or RGBA).
The components are transferred to this buffer.