img_dtransform_create()
QNX SDP8.0Image Library ReferenceAPIDeveloperProgramming
Prepare to transform an image
Synopsis:
#include <img/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:
libimg
Use the -l img option to qcc to link against this library.
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: | |
---|---|
Signal handler | No |
Thread | No |
Page updated: