unsigned char * CSpriteX::loadImageFile(CFileData *image, IMAGEFILE *imgFile, GLuint &texture)
{
FREE_IMAGE_FORMAT fif = FreeImage_GetFIFFromFilename(image->getName().c_str());
FIMEMORY * stream = 0;
unsigned char tempRGB;
GLuint tempTex = 0;
GLenum errCode;
bool error = false;
stream = FreeImage_OpenMemory(image->getData());
if(FreeImage_FIFSupportsReading(fif))
imgFile->dib = FreeImage_LoadFromMemory(fif, stream);
if(!imgFile->dib)
return NULL;The rest of the function should be unneeded. The type of image->getData() is unsigned char * and returns a pointer to the first element of my image data. imgFile->dib is type FIBITMAP *.
EDIT: Disregard this, I fixed it.

Find content
Not Telling