VuoFreeImage implementation.
Definition in file VuoFreeImage.c.
Go to the source code of this file.
Macros | |
#define | BOOL FREEIMAGE_BOOL |
Support compiling in Objective-C mode (which defines its own BOOL type having a different underlying type than FreeImage's). | |
Functions | |
static void | VuoFreeImage_error (FREE_IMAGE_FORMAT fif, const char *message) |
Logs error messages coming from FreeImage. | |
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. | |
#define BOOL FREEIMAGE_BOOL |
Support compiling in Objective-C mode (which defines its own BOOL type having a different underlying type than FreeImage's).
Definition at line 13 of file VuoFreeImage.c.
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.
|
static |
Logs error messages coming from FreeImage.
Definition at line 37 of file VuoFreeImage.c.