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
Crop an image
#include <img.h>
int img_crop( const img_t *src,
img_t *dst,
const unsigned x,
const unsigned y );
- 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.
img
This function will crop a source image at a given set of source coordinates
x, y to the dimensions specified by the destination image.
- IMG_ERR_OK
- Success
- IMG_ERR_PARM
-
- source image width, height, and/or format not set.
- destination image width, and/or height not set.
- destination image larger than source image.
- crop co-ordinates plus size of destination image exceed source image bounds.
- IMG_ERR_NOSUPPORT
- Destination image format not supported
- IMG_ERR_MEM
- Memory allocation failure
Image library
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
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