img_dtransform()

Convert an image from one format to another

Synopsis:

#include <img.h>

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

Arguments:

src
The image you want to convert from
dst
The image you want to convert to

Library:

img

Description:

This function converts a img_t from one format to another. Best to use this when you only need to do the transform once on a single img_t. Returns IMG_ERR_OK if the transform succeeed, otherwise returns one of the documented error codes of img_dtransform_create()


Note: This function cannot convert from a direct format source to a palette-based format destination.

Returns:

IMG_ERR_OK
Success.
IMG_ERR_NOSUPPORT
One of the formats specified is invalid.

Classification:

Image library

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

img_convert_data(), IMG_FMT_BPL(), img_lib_attach()