Basically, in a nutshell, I have an archive of resources (not a standard archive, one I wrote myself). Let's say for example I pull a .png file out of that archive and into a char array. So, the ENTIRE image file is in that array, including the header. I need to get the image data into a dib. I looked around and found this function:
[source]FreeImage_LoadFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));[/source]
Could I use this to get what I need? For example...
Assume that fif, io and image are declared and initialized. image is the char array of image data.
[source]
FIBITMAP* dib = FreeImage_LoadFromHandle(fif, &io, (fi_handle)image, 0);
unsigned char * bits = FreeImage_GetBits(dib);
[/source]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement