BMP confusion...
I''m having problems understanding why my bitmap loader is not working! I tried to relocate the file pointer to the actual bitmap data:
fseek(file_ptr,sizeof(BITMAPFILEHEADER) + (bitmapfileheader.biOffbits),SEEK_SET);
then I read it into my UCHAR *buffer:
fread(&bmp_holder->bmp_file.buffer,sizeof(bmp_holder->bmp_file.bitmapfileheader.biSizeImage),1,file_ptr);
but then when I do a memcpy:
memcpy(buffer,bmp_holder->bmp_file.buffer,(bytes_per_line*height);
I get a access error... does it matter that my buffer is in a structure that''s inside a structure? I hope someone can help me... I tried just about everything... Thanks in advance!!
Open the hushed casket...
Maybe my question will sound a bit silly ... but did you allocate enough memory for your ''buffer'' ?
__________________________
Bruno Wieckowski
Lead Programmer
Exood4 Studios
__________________________
Bruno Wieckowski
Lead Programmer
Exood4 Studios
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement