pixel_cache - ImageMagick Pixel Cache Methods
IndexPacket * GetIndexes( const Image *image );
PixelPacket * GetOnePixel( const Image image, const int x, const int y );
PixelPacket * GetPixelCache( Image *image, const int x, const int y, const unsigned int columns, const unsigned int rows );
PixelPacket * GetPixels( const Image image );
unsigned int ReadPixelCache( const Image *image, const QuantumType 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( const Image *, const QuantumType quantum, unsigned char *destination );
Method GetIndexes returns the colormap indexes associated with the last call to the SetPixelCache
or GetPixelCache
methods.
The format of the GetIndexes method is:
IndexPacket *GetIndexes ( const Image *image );
A description of each parameter follows:
SetPixelCache
or GetPixelCache
methods.
Method GetOnePixel returns a single pixel at the specified (x,y) location. The image background color is returned if an error occurs.
The format of the GetOnePixel method is:
PixelPacket *GetOnePixel ( const Image image, const int x, const int y );
A description of each parameter follows:
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 GetPixels returns the pixels associated with the last call to the SetPixelCache
or GetPixelCache
methods.
The format of the GetPixels method is:
PixelPacket *GetPixels ( const Image image );
A description of each parameter follows:
SetPixelCache
or GetPixelCache
methods.
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 ( const Image *image, const QuantumType quantum, const unsigned char *source );
A description of each parameter follows:
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 method 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 SyncPixelCache saves the image pixels to the in-memory or disk cache. The method returns True if the pixel region is synced, otherwise False.
The format of the SyncPixelCache method is:
unsigned int SyncPixelCache ( Image *image );
A description of each parameter follows:
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 ( const Image *, const QuantumType quantum, unsigned char *destination );
A description of each parameter follows: