cache - Methods to Get or Set Image Pixels
void CloseImagePixels( Image *image );
void ClosePixelCache( Image *image );
unsigned int CompressCache( Cache cache );
DestroyCache( void );
void DestroyImagePixels( Image *image );
void DestroyPixelCache( Image *image );
status: Method GetImagePixels( )returns a pointer to the pixels is returned if the pixels are transferred, otherwise a NULL is returned.;
indexes: Method GetIndexes( )returns the colormap indexes associated with the last call to the SetImagePixels( )or GetImagePixels( )methods.;
indexes: Method GetIndexesFromCache( )returns the colormap indexes associated with the last call to the SetPixelCache( )or GetPixelCache( )methods.;
pixels: Method GetOnePixel( )returns a pixel at the specified( x, y );
PixelPacket * GetOnePixelFromCache( 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 );
pixels: Method GetPixels( )returns the pixels associated with the last call to the SetImagePixels( )or GetImagePixels( )methods.;
PixelPacket * GetPixelsFromCache( const Image image );
PixelPacket * SetImagePixels( Image *image, const int x, const int y, const unsigned int columns, const unsigned int rows );
PixelPacket * SetPixelCache( Image *image, const int x, const int y, const unsigned int columns, const unsigned int rows );
unsigned int SyncImagePixels( Image *image );
unsigned int SyncPixelCache( Image *image );
unsigned int UncompressCache( Cache cache );
unsigned int WriteCacheInfo( Image *image );
Method CloseImagePixels closes the pixel cache. Use this method to prevent 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 ClosePixelCache closes the pixel cache. Use this method to prevent 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 ClosePixelCache method is:
void ClosePixelCache ( Image *image );
A description of each parameter follows:
Method CompressCache compresses the disk-based pixel cache.
The format of the CompressCache method is:
unsigned int CompressCache ( Cache cache );
A description of each parameter follows:
Method DestroyCache destroys the cache environment.
The format of the DestroyCache method is:
DestroyCache ( void );
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 DestroyPixelCache deallocates memory associated with the pixel cache.
The format of the DestroyPixelCache method is:
void DestroyPixelCache ( Image *image );
A description of each parameter follows:
Method GetImagePixels ( ) gets pixels from the in-memory or disk pixel cacheas defined by the geometry parameters. A pointer to the pixels is returnedif 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:
status: Method GetImagePixels ( ) returns a pointer to the pixels is returned if the pixels are transferred, otherwise a NULL is returned.;
Method GetIndexes ( ) returns the colormap indexes associated with the lastcall to the SetImagePixels ( ) or GetImagePixels ( ) methods.;
The format of the GetIndexes method is:
IndexPacket *GetIndexes ( const Image *image );
A description of each parameter follows:
indexes: Method GetIndexes ( ) returns the colormap indexes associated with the last call to the SetImagePixels ( ) or GetImagePixels ( ) methods.;
Method GetIndexesFromCache returns the colormap indexes associated with the last call to the SetPixelCache()
or GetPixelCache()
methods.
The format of the GetIndexesFromCache method is:
IndexPacket *GetIndexesFromCache ( const Image *image );
A description of each parameter follows:
indexes: Method GetIndexesFromCache ( ) returns the colormap indexes associated with the last call to the 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:
pixels: Method GetOnePixel ( ) returns a pixel at the specified ( x, y );
location. =over 4
Method GetOnePixelFromCache returns a single pixel at the specified (x,y) location. The image background color is returned if an error occurs.
The format of the GetOnePixelFromCache method is:
PixelPacket *GetOnePixelFromCache ( const Image image, const int x, const int y );
A description of each parameter follows:
Method GetPixels ( ) returns the pixels associated with the last call to theSetImagePixels ( ) or GetImagePixels ( ) methods.;
The format of the GetPixels method is:
PixelPacket *GetPixels ( const Image image );
A description of each parameter follows:
pixels: Method GetPixels ( ) returns the pixels associated with the last call to the SetImagePixels ( ) or GetImagePixels ( ) methods.;
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 GetPixelsFromCache returns the pixels associated with the last call to the SetPixelCache()
or GetPixelCache()
methods.
The format of the GetPixelsFromCache method is:
PixelPacket *GetPixelsFromCache ( const Image image );
A description of each parameter follows:
SetPixelCache()
or GetPixelCache()
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 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 SyncImagePixels ( ) saves the image pixels to the in-memory or diskcache. The method returns True if the pixel region is synced, otherwiseFalse.;
The format of the SyncImagePixels method is:
unsigned int SyncImagePixels ( Image *image );
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 UncompressCache uncompresses the disk-based pixel cache.
The format of the UncompressCache method is:
unsigned int UncompressCache ( Cache cache );
A description of each parameter follows:
Method WriteCacheInfo writes the persistent cache meta information to a file on disk.
The format of the WriteCacheInfo method is:
unsigned int WriteCacheInfo ( Image *image );
A description of each parameter follows: