Jump to content
  • Advertisement

Archived

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

VersusReal

BMP confusion...

This topic is 5844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!