Editions
Related Functions
Example
The IN_CropLayer function crops the raster layer in the specified document window. You can specify the x,y coordinates of the diagonal corners of the crop area, or have Imagenation automatically remove the white space around the image, or crop the image to a standard size. The result either is placed in a new window or overwrites the original, depending on the overwrite raster flag.
Syntax
int IN_CropLayer( docwinID, pageID, layerID, predefinedSize, coordSystem, x1, y1, x2, y2, pNewDocwinID )
|
Input Parameters |
Values |
Meaning |
|
IN_DOCWIN docwinID |
0 | docwinID |
active | specific |
|
IN_PAGE pageID |
0 |
|
|
IN_LAYER layerID |
identifier of the raster layer to crop | |
|
SHORT predefinedSize |
IN_PREDEFINED_CROPSIZE_NONE (0) IN_PREDEFINED_CROPSIZE_AUTO (1) IN_PREDEFINED_CROPSIZE_AUTOSS (2) | |
|
SHORT coordSystem |
0 |
placeholder |
|
long x1, y1 |
top-left corner, in pixels | |
|
long x2, y2 |
bottom-right corner, in pixels | |
|
Meaning | ||
|
IN_DOCWIN_PTR pNewDocwinID |
pointer to the new document window identifier. See Remarks. | |
Remarks
With automatic cropping, Imagenation removes (or adds for AUTOSS) white space around the image to create a smaller image with no loss of significant data (non-0 pixels are significant data). Only works on bilevel rasters.
If the overwrite raster flag is set to on, pNewDocwinID is the original docwinID. The value is NULL if the function fails.
Release information
Added to Imagenation for Windows in Release 4.10.
Modified to allow for automatic cropping in Release 4.50.
As of Release 5.1, also available in Imagenation for UNIX.
Also supported in Imagenation 3.3 for UNIX.
See also