BMP file problem

Started by
12 comments, last by deftware 11 years, 3 months ago
All i need is to know how to get the images in the .BMP loader's specification.

Im sorry, but i can't follow your linked tutorial because it is 11 years old and deprecated.

The steps are still valid in MSVS.

Advertisement

I made two bitmaps in gimp, one with colorspace information, one without, opened them up in a hex editor, found the byte your code does the switch/case statement on, with colorspace info included the value is 108, without it the value is 40, which is what your code relies on in order to operate. Therefore, either your GIMP version is broken (ignoring the checkbox?) or you're missing something..

On a personal note, this is why I study all file formats and write my own loading code from scratch. I avoid jpeg format because there are seemingly endless variants. Your code looks like it should work just fine with the bitmaps output by GIMP.

If you're getting the SAME windows v4 error, then you are obviously not replacing the actual bitmap file that your program is trying to load.

I made two bitmaps in gimp, one with colorspace information, one without, opened them up in a hex editor, found the byte your code does the switch/case statement on, with colorspace info included the value is 108, without it the value is 40, which is what your code relies on in order to operate. Therefore, either your GIMP version is broken (ignoring the checkbox?) or you're missing something..

On a personal note, this is why I study all file formats and write my own loading code from scratch. I avoid jpeg format because there are seemingly endless variants. Your code looks like it should work just fine with the bitmaps output by GIMP.

If you're getting the SAME windows v4 error, then you are obviously not replacing the actual bitmap file that your program is trying to load.

Hey Radio, you're completely right and i appreciate you going the extra step for me. It loads perfectly now. Apparently exporting over the same file does not write over it. What i should have done was use GIMP's "overwrite" function, which didn't exist years ago when i used GIMP. Thanks Radio :)

you are welcome, glad I could help ;D

This topic is closed to new replies.

Advertisement