|
GIMP produces invalid bitmaps. |
Chris Katko
Member #1,881
January 2002
|
Be warned, GIMP 2.8.2 is producing invalid bitmaps that won't load in A4. No matter whether I go 32-bit, 24-bit, or 16-bit, none of them will load. However, using say, MS Paint works just fine. If I produce an image in MS Paint, and then load and export the same image from GIMP? No dice. I've looked online and plenty of other people have shown the same problem dating all the way back to 2008. I've also seen some forum posts on Allegro that describe the same problem I'm having. What a pathetic, glaring issue to leave wide open (on GIMP's part). -----sig: |
Arthur Kalliokoski
Second in Command
February 2005
|
Are you talking about Windows .BMP format? Does MS Paint load the Gimp images? If so, I'd have to say it's Allegro's fault. They all watch too much MSNBC... they get ideas. |
Chris Katko
Member #1,881
January 2002
|
Well, that is possible that it is Allegro's fault. MS Paint does load the "bad" GIMP bitmaps, but once MS Paint saves the exact picture, they are definitely different in structure and size. (see attached.) It appears that the GIMP version adds additional data to the header section. Perhaps it's in a different "bitmap version header" (1/2/3/4/5), but from a brief read, I think longest headers are supposed to be the later versions. Under a hex editor, it appears to add a section with a start denoted by the letters "BGRs." Also, while the ones I posted are both 24-bit; in my program, I tried 32-bit /w alpha, 32-bit /w padding, 24-bit, and 16-bit exports and none of them would load under Allegro. -----sig: |
Audric
Member #907
January 2001
|
Made a little search using a hex editor, these use the BITMAPV4HEADER, Compression method is zero (ie. raw 24bit RGB data). Height is positive, so it doesn't use the bottom-to-top encoding. So far it seems to be very classic. edit after further research: |
Elias
Member #358
May 2000
|
Allegro 5 should be able to load it. A4 is from like the 1990s, no big surprise newer formats are not supported. -- |
Pho75_
Member #12,377
November 2010
|
This is a known problem. gimp 2.8 defaults to new version of BMP format by default (ver 5 if memory serves). Compatibility Options > Do not write color space information This will create BMP files compatible with Allegro4 and Allegro5 image loader code. If you decide to upgrade to Allegro5 you'll want to disable the native image loading when building the libaray, in order to read those old-format BMP's. Cheers, P.S: I fought with all this earlier, gave up and switched to PNG. |
Peter Wang
Member #23
April 2000
|
Allegro 5 loads the examples Chris provided, at least when using the Allegro BMP loader (and not some OS-specific routines). But PNG is recommended.
|
pellea72
Member #7,682
August 2006
|
I know that for Allegro 4.4x you have to watch how you save the .BMP file in GIMP. When you go to Export to BMP (or "save as" in older versions of GIMP), the last pop-up dialog before saving will have an "Advanced Options" menu option. Inside there you need to select 24-bit RGB (if memory serves me) for the file to display correctly in Allegro 4. Remember, even if you use transparency in your game, Allegro 4 uses hot pink for that, not an alpha layer. I haven't used Allegro 5, so I can't say if it has the same problem. Edit: Reading your second post, I see you've tried different bit depths. But I'll leave this post as-is for anyone who may need to know this information. |
|