I'm using the FreeImage Library to handle loading images and passing them to OpenGL. Currently, I have support for reading an image from a file. However, I'd like to extend this to being able to read from a variable for the purpose of game content packages. Basically, in short, I have the entire file, header and all, written to an unsigned char *. I want to take this buffer and do something similar to this with it (assume variable fif is declared):
FIBITMAP * dib = FreeImage_Load(fif, "someImage.png");
but instead of someImage.png, I want to specify the unsigned char * (lets call it buffer for the sake of the question). Is there a method in the library that can handle such a thing?
EDIT: I should be a bit more specific considering "someImage.png" can be considered an unsigned char *.
To clear confusion up, if any, the value of unsigned char * buffer would be determined by something like this psuedo code:
fileStream = openFile "someImage.png"
unsigned char * buffer = fileStream.ReadToEnd