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

img_dtransform_create()

Prepare to transform an image

Synopsis:

#include <img.h>

int img_dtransform_create( const img_t *src,
                           const img_t *dst,
                           img_dtransform_t *xform );

Arguments:

src
The image you want to convert from
dst
The image you want to convert to
xform
The address to an opaque img_dtransform_t where the function stores the transform it creates.

Library:

img

Description:

This function pepares a data transformation from one format to another, from the format in the src image to the format in the dst image. Once this function is called, you call img_dtransform_apply() to apply the transformation, then img_dtransform_free() to free the xform opaque structure.


Note:
  • Data transforms are capable of handling palette-based formats, abstracting the details of conversions and/or expansion. It's generally easiest to use this construct when converting data from one arbitrary format to another.
  • Conversion to a palette-based format is not supported.

Returns:

IMG_ERR_OK
Success. The xform is valid and must be freed when the transform is finished. For any other return code (error), the xform isn't valid, and it must not be freed.
IMG_ERR_PARM
Required bits in the flags member of src aren't set (at a minimum IMG_H and IMG_W need to be set).
IMG_ERR_MEM
Insufficient memory for transform
IMG_ERR_NOSUPPORT
No support for the requested transform.

Classification:

Image library

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

img_t, img_dtransform_apply(), img_dtransform_free()


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