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_resize_fs.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_resize_fs.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_resize_fs.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_resize_fs.html on line 8

img_resize_fs()

Resize an image

Synopsis:

#include <img.h>

int img_resize_fs( const img_t *src,
                   img_t *dst );

Arguments:

src
The image to resize.
dst
The address of an img_t describing the destination. If you do not specify one of width or height in the dst (that is, the field isn't marked as valid in flags) then this function will calculate the missing dimension based on the aspect ratio of the src image.

Library:

img

Description:

This function resizes the image src to fit into the image described by dst. The algorithm is a simple “fast smooth” algorithm (that is, the algorithm yields results much more visually pleasing and smooth than simple pixel replication, but is faster than applying a filter function).

The formats of src and dst do not have to be the same; if they are different the data will be converted. However, a palette-based dst format is not supported.

Resize can be done in place, but the src and dst data pointers must be the same. You will get unpredictable results by partially overlapping src and dst data buffers.

Returns:

IMG_ERR_OK
Success
IMG_ERR_PARM
Some fields of src are missing (that is, not marked as valid in flags)
IMG_ERR_NOSUPPORT
Unsupported format/conversion
IMG_ERR_MEM
Insufficient memory (the function requires a small amount of working memory)

Classification:

Image library

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

img_rotate_ortho()


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_resize_fs.html on line 123

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_resize_fs.html on line 123