ImageGear Professional for Linux
IG_load_rect_set

This function sets the load rectangle.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_load_rect_set(
   AT_PIXPOS nX,
   AT_PIXPOS nY,
   AT_DIMENSION nWidth,
   AT_DIMENSION nHeight
);

Arguments:

Name Type Description
nX AT_PIXPOS X coordinate of load rectangle.
nY AT_PIXPOS Y coordinate of load rectangle.
nWidth AT_DIMENSION Width of load rectangle.
nHeight AT_DIMENSION Height of load rectangle.

Return Value:

Returns 0 if successful. Otherwise, returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

This function does not process image pixels.

Example:

 
Copy Code
/* Set to only load the upper left 1000 x 500 of the image: */
IG_load_rect_set ( 0, 0, 1000, 500 );

Remarks:

This function will cause an image loaded to be cropped. Portions of the image falling outside the coordinates of this rectangle will be discarded, and will not appear in the image bitmap of the DIB created by the load.

To reset ImageGear to its default behavior of loading the whole image, set all parameters to 0. See also IG_load_rect_get function.

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback