in the LoadBMP()
Code:
if (File)// Does The File Exist?
{
fclose(File);// Close The Handle
return auxDIBImageLoad(Filename);// Load The BitauxDIBImageLoadmap And Return A Pointer
}
you close the file before () is allowed to load it.
try something like this
Code:
AUX_RGBImageRec *LoadBMP(char *Filename)// Loads A Bitmap Image
{
FILE *File=NULL;// File Handle
AUX_RGBImageRec* dib = NULL;
if (!Filename)// Make Sure A Filename Was Given
{
return NULL;// If Not Return NULL
}
File=fopen(Filename,"r");// Check To See If The File Exists
if (File)// Does The File Exist?
{
dib = auxDIBImageLoad(Filename);// Load The Bitmap And Return A Pointer
fclose(File);// Close The Handle
return dib;
}
return NULL;// If Load Failed Return NULL
}