<pixel_cache - ImageMagick Pixel Cache Methods9W




"NAME

4

pixel_cache - ImageMagick Pixel Cache Methods



2page index




&SYNOPSIS

G

IndexPacket * GetIndexes( const Image *image );

a

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 );

E

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 );

E

unsigned int SyncPixelCache( Image *image );

~

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



2page index


$

FUNCTION *DESCRIPTIONS



,

GetIndexes

Method GetIndexes returns the colormap indexes associated with the last call to the SetPixelCache or GetPixelCache methods.

.

The format of the GetIndexes method is:

k
IndexPacket *GetIndexes ( const Image *image );

AA description of each parameter follows:


D

indexes:

Method GetIndexes returns the colormap indexes associated with the last call to the SetPixelCache or GetPixelCache methods.

@

image:

)The address of a structure of type Image.



.

GetOnePixel

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 );

AA description of each parameter follows:


B

pixels:

CMethod GetOnePixel returns a pixel at the specified (x,y) location.

"

image:

)The address of a structure of type Image.

>

x,y:

8These values define the location of the pixel to return.



2

GetPixelCache

s

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

1

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 );

AA description of each parameter follows:


B

status:

lMethod 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:

8These values define the perimeter of a region of pixels.



*

GetPixels

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 );

AA description of each parameter follows:


#

pixels:

Method GetPixels returns the pixels associated with the last call to the SetPixelCache or GetPixelCache methods.

"

image:

)The address of a structure of type Image.



4

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.

2

The format of the ReadPixelCache method is:

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

AA 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.

D

quantum:

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

B

source:

6The pixel components are transferred from this buffer.



2

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 method SyncPixelCache. dA pointer to the pixels is returned if the pixels are transferred, otherwise a *NULL is returned.

1

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 );

AA description of each parameter follows:


#

pixels:

lMethod 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:

8These values define the perimeter of a region of pixels.



4

SyncPixelCache

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.

2

The format of the SyncPixelCache method is:

i
unsigned int SyncPixelCache ( Image *image );

AA description of each parameter follows:


#

status:

vMethod 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.



6

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.

3

The format of the WritePixelCache method is:

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

AA 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:

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

L

destination:

.The components are transferred to this buffer.
9

page index