NAME

pixel_row_iterator - Pixel row iterator pattern support functions


SYNOPSIS

MagickPassFail PixelRowIterateDualModify( PixelRowIteratorDualModifyCallback call_back, const char *description, void *user_data, const unsigned long columns, const unsigned long rows, const Image *source_image, const long source_x, const long source_y, Image *update_image, const long update_x, const long update_y, ExceptionInfo *exception );

MagickPassFail PixelRowIterateDualNew( PixelRowIteratorDualNewCallback call_back, const char *description, void *user_data, const unsigned long columns, const unsigned long rows, const Image *source_image, const long source_x, const long source_y, Image *new_image, const long new_x, const long new_y, ExceptionInfo *exception );

MagickPassFail PixelRowIterateDualRead( PixelRowIteratorDualReadCallback call_back, const char *description, void *user_data, const unsigned long columns, const unsigned long rows, const Image *first_image, const long first_x, const long first_y, const Image *second_image, const long second_x, const long second_y, ExceptionInfo *exception );;

MagickPassFail PixelRowIterateMonoModify( PixelRowIteratorMonoModifyCallback call_back, const char *description, void *user_data, const long x, const long y, const unsigned long columns, const unsigned long rows, Image *image, ExceptionInfo *exception );

MagickPassFail PixelRowIterateMonoRead( PixelRowIteratorMonoReadCallback call_back, const char *description, void *user_data, const long x, const long y, const unsigned long columns, const unsigned long rows, const Image *image, ExceptionInfo *exception );


FUNCTION DESCRIPTIONS

PixelRowIterateMonoRead

PixelRowIterateMonoRead() iterates through a region of an image and invokes a user-provided callback function ( of type PxelRowIteratorMonoReadCallback ) for a row of pixels. This is useful to support simple operations such as statistics computation.

The format of the PixelRowIterateMonoRead method is:

MagickPassFail PixelRowIterateMonoRead ( PixelRowIteratorMonoReadCallback call_back, const char *description, void *user_data, const long x, const long y, const unsigned long columns, const unsigned long rows, const Image *image, ExceptionInfo *exception );

A description of each parameter follows:

call_back:

A user-provided C callback function which is passed the address of a pixel from each image.

description:

textual description of operation being performed.

user_data:

User-provided context data.

x:

The horizontal ordinate of the top left corner of the region.

y:

The vertical ordinate of the top left corner of the region.

columns:

Width of pixel region

rows:

Height of pixel region

image:

The address of the Image.

exception:

If an error is reported, this argument is updated with the reason.

PixelRowIterateMonoModify

PixelRowIterateMonoModify() iterates through a region of an image and invokes a user-provided callback function ( of type PixelRowIteratorMonoReadCallback ) for each row of pixels. This is useful to support simple operations such as level shifting, colorspace translation, or thresholding.

The format of the PixelRowIterateMonoModify method is:

MagickPassFail PixelRowIterateMonoModify ( PixelRowIteratorMonoModifyCallback call_back, const char *description, void *user_data, const long x, const long y, const unsigned long columns, const unsigned long rows, Image *image, ExceptionInfo *exception );

A description of each parameter follows:

call_back:

A user-provided C callback function which is passed the address of a row of pixels from each image.

description:

textual description of operation being performed.

user_data:

User-provided context data.

x:

The horizontal ordinate of the top left corner of the region.

y:

The vertical ordinate of the top left corner of the region.

columns:

Width of pixel region

rows:

Height of pixel region

image:

The address of the Image.

exception:

If an error is reported, this argument is updated with the reason.

PixelRowIterateDualRead

PixelRowIterateDualRead() iterates through pixel regions of two images and invokes a user-provided callback function ( of type PixelRowIteratorDualReadCallback ) for each row of pixels. This is useful to support operations such as image comparison.

The format of the PixelRowIterateDualModify method is:

MagickPassFail PixelRowIterateDualRead ( PixelRowIteratorDualReadCallback call_back, const char *description, void *user_data, const unsigned long columns, const unsigned long rows, const Image *first_image, const long first_x, const long first_y, const Image *second_image, const long second_x, const long second_y, ExceptionInfo *exception );;

A description of each parameter follows:

call_back:

A user-provided C callback function which is passed the address of a row of pixels from each image.

description:

textual description of operation being performed.

user_data:

User-provided context data.

columns:

Width of pixel region

rows:

Height of pixel region

first_image:

The address of the first Image.

first_x:

The horizontal ordinate of the top left corner of the first region.

first_y:

The vertical ordinate of the top left corner of the first region.

second_image:

The address of the second Image.

second_x:

The horizontal ordinate of the top left corner of the second region.

second_y:

The vertical ordinate of the top left corner of the second region.

exception:

If an error is reported, this argument is updated with the reason.

PixelRowIterateDualModify

PixelRowIterateDualModify() iterates through pixel regions of two images and invokes a user-provided callback function ( of type PixelRowIteratorDualModifyCallback ) for each row of pixels. This is useful to support operations such as composition.

The format of the PixelRowIterateDualModify method is:

MagickPassFail PixelRowIterateDualModify ( PixelRowIteratorDualModifyCallback call_back, const char *description, void *user_data, const unsigned long columns, const unsigned long rows, const Image *source_image, const long source_x, const long source_y, Image *update_image, const long update_x, const long update_y, ExceptionInfo *exception );

A description of each parameter follows:

call_back:

A user-provided C callback function which reads from a row of source pixels and updates a row of destination pixels.

description:

textual description of operation being performed.

user_data:

User-provided context data.

columns:

Width of pixel region

rows:

Height of pixel region

source_image:

The address of the constant source Image.

source_x:

The horizontal ordinate of the top left corner of the source region.

source_y:

The vertical ordinate of the top left corner of the source region.

update_image:

The address of the update Image.

update_x:

The horizontal ordinate of the top left corner of the update region.

update_y:

The vertical ordinate of the top left corner of the update region.

exception:

If an error is reported, this argument is updated with the reason.

PixelRowIterateDualNew

PixelRowIterateDualNew() iterates through pixel regions of two images and invokes a user-provided callback function ( of type PixelRowIteratorDualNewCallback ) for each row of pixels. This is used if a new output image is created based on an input image. The difference from PixelRowIterateDualModify ( ) is that the output pixels are not initialized so it is more efficient when outputting a new image.

The format of the PixelRowIterateDualNew method is:

MagickPassFail PixelRowIterateDualNew ( PixelRowIteratorDualNewCallback call_back, const char *description, void *user_data, const unsigned long columns, const unsigned long rows, const Image *source_image, const long source_x, const long source_y, Image *new_image, const long new_x, const long new_y, ExceptionInfo *exception );

A description of each parameter follows:

call_back:

A user-provided C callback function which reads from a row of source pixels and initializes a row of destination pixels.

description:

textual description of operation being performed.

user_data:

User-provided context data.

columns:

Width of pixel region

rows:

Height of pixel region

source_image:

The address of the constant source Image.

source_x:

The horizontal ordinate of the top left corner of the source region.

source_y:

The vertical ordinate of the top left corner of the source region.

new_image:

The address of the new Image.

new_x:

The horizontal ordinate of the top left corner of the new region.

new_y:

The vertical ordinate of the top left corner of the new region.

exception:

If an error is reported, this argument is updated with the reason.