Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/gf/dev_guide/img/img_crop.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/gf/dev_guide/img/img_crop.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/gf/dev_guide/img/img_crop.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/gf/dev_guide/img/img_crop.html on line 8

img_crop()

Crop an image

Synopsis:

#include <img.h>

int img_crop( const img_t *src, 
              img_t *dst, 
              const unsigned x, 
              const unsigned y );

Arguments:

src
The address of the source img_t structure to crop.
dst
The address of the destination img_t structure, which requires the width (IMG_W) and height (IMG_H) to be specified at a minimum.
x
The horizontal coordinate in the source image to begin the crop operation.
y
The vertical coordinate in the source image to begin the crop operation.

Library:

img

Description:

This function will crop a source image at a given set of source coordinates x, y to the dimensions specified by the destination image.

Returns:

IMG_ERR_OK
Success
IMG_ERR_PARM
IMG_ERR_NOSUPPORT
Destination image format not supported
IMG_ERR_MEM
Memory allocation failure

Classification:

Image library

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

img_resize_fs()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/gf/dev_guide/img/img_crop.html on line 148

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/gf/dev_guide/img/img_crop.html on line 148