VuoFreeImage interface.
Definition in file VuoFreeImage.h.
Go to the source code of this file.
Typedefs | |
typedef struct FIBITMAP | FIBITMAP |
FreeImage bitmap. | |
Functions | |
FIBITMAP * | VuoFreeImage_convertVuoImageToFreeImage (VuoImage image, bool allowFloat, bool unpremultiply) |
Returns a FIBITMAP containing the pixel data from image , or NULL if the image couldn't be converted. | |
VuoImage | VuoFreeImage_convertFreeImageToVuoImage (FIBITMAP *fi, void *dataToFree, const char *imageURL) |
Returns a VuoImage containing the pixel data from fi , or NULL if the image couldn't be converted. | |
FreeImage bitmap.
Definition at line 19 of file VuoFreeImage.h.
VuoImage VuoFreeImage_convertFreeImageToVuoImage | ( | FIBITMAP * | fi, |
void * | dataToFree, | ||
const char * | imageURL | ||
) |
Returns a VuoImage
containing the pixel data from fi
, or NULL if the image couldn't be converted.
This function takes ownership of fi
; the caller should not modify it or call FreeImage_Unload
on it. This function will release fi
even if conversion fails.
dataToFree
(optional) is free()
d as part of the VuoImage
's destructor.
Definition at line 233 of file VuoFreeImage.c.
FIBITMAP * VuoFreeImage_convertVuoImageToFreeImage | ( | VuoImage | image, |
bool | allowFloat, | ||
bool | unpremultiply | ||
) |
Returns a FIBITMAP
containing the pixel data from image
, or NULL if the image couldn't be converted.
If allowFloat
is true and the input image is VuoImageColorDepth_32
, this function will return FIT_RGBAF
. Otherwise it will return an integer format (FIT_BITMAP
, FIT_RGBA16
, FIT_UINT16
).
If unpremultiply
is true, the RGB components are divided by the alpha component (required for FreeImage_Save
with some formats).
Definition at line 64 of file VuoFreeImage.c.