pixels - Methods to Get or Set Image Pixels
void CloseImagePixels( Image *image );
void DestroyImagePixels( Image *image );
PixelPacket * GetImagePixels( Image *image, const int x, const int y, const unsigned int columns, const unsigned int rows );
IndexPacket * GetIndexes( const Image *image );
PixelPacket * GetOnePixel( const Image image, const int x, const int y );
PixelPacket * GetPixels( const Image image );
PixelPacket * SetImagePixels( Image *image, const int x, const int y, const unsigned int columns, const unsigned int rows );
unsigned int SyncImagePixels( Image *image );
Method CloseImagePixels closes the pixel cache. Use this method to prevent the too many file descriptors from being allocated when reading an image sequence. File descriptors are only used for a disk-based cache. This is essentially a no-op for a memory-based cache.
The format of the CloseImagePixels method is:
void CloseImagePixels ( Image *image );
A description of each parameter follows:
Method DestroyImagePixels deallocates memory associated with the pixel cache.
The format of the DestroyImagePixels method is:
void DestroyImagePixels ( Image *image );
A description of each parameter follows:
Method GetIndexes returns the colormap indexes associated with the last call to the SetImagePixels()
or GetImagePixels()
methods.
The format of the GetIndexes method is:
IndexPacket *GetIndexes ( const Image *image );
A description of each parameter follows:
SetImagePixels()
or GetImagePixels()
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 GetImagePixels 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 GetImagePixels method is:
PixelPacket *GetImagePixels ( 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 SetImagePixels()
or GetImagePixels()
methods.
The format of the GetPixels method is:
PixelPacket *GetPixels ( const Image image );
A description of each parameter follows:
SetImagePixels()
or GetImagePixels()
methods.
Method SetImagePixels 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 SyncImagePixels. A pointer to the pixels is returned if the pixels are transferred, otherwise a NULL is returned.
The format of the SetImagePixels method is:
PixelPacket *SetImagePixels ( Image *image, const int x, const int y, const unsigned int columns, const unsigned int rows );
A description of each parameter follows:
Method SyncImagePixels 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 SyncImagePixels method is:
unsigned int SyncImagePixels ( Image *image );
A description of each parameter follows: