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

img_rotate_ortho()

Rotate an image by 90-degree increments

Synopsis:

#include <img.h>

int img_rotate_ortho( const img_t *src,
                      img_t *dst,
                      img_fixed_t angle );

Arguments:

src
The image to rotate
dst
The address of an img_t describing the destination. If you don't specify width or height (or both) in the dst then this function will calculate the missing dimension(s) based on the src image, taking into account the rotation. If you do specify either width or height (or both), the image is clipped as necessary; unused data remains untouched.
angle
A 16.16 fixed point representation of the angle (in radians). There are 3 defines provided for convenience:

Library:

img

Description:

This function rotates the src image by 90-degree increments. The rotation is not a true “rotation” in that the image is not rotated about a fixed point. Rather, the image itself is rotated and the new origin of the image becomes the upper-left corner of the rotated image.

The formats of src and dst don't have to be the same; if they are different, the data is converted. A palette-based dst format is only supported if the src data also is palette-based.


Note: Rotation cannot be done in place.

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 or angle
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_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_rotate_ortho.html on line 146

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_rotate_ortho.html on line 146