Archived

This topic is now archived and is closed to further replies.

VersusReal

BMP confusion...

Recommended Posts

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...

Share this post


Link to post
Share on other sites
Maybe my question will sound a bit silly ... but did you allocate enough memory for your ''buffer'' ?

__________________________



Bruno Wieckowski
Lead Programmer
Exood4 Studios

Share this post


Link to post
Share on other sites