<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>GIMP produces invalid bitmaps.</title>
		<link>http://www.allegro.cc/forums/view/613029</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sat, 27 Jul 2013 16:09:10 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Be warned, GIMP 2.8.2 is producing invalid bitmaps that won&#39;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.</p><p>I&#39;ve looked online and plenty of other people have shown the same problem dating all the way back to 2008. I&#39;ve also seen some forum posts on Allegro that describe the same problem I&#39;m having.</p><p>What a pathetic, glaring issue to leave wide open (on GIMP&#39;s part). <img src="http://www.allegro.cc/forums/smileys/rolleyes.gif" alt="::)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Chris Katko)</author>
		<pubDate>Fri, 26 Jul 2013 10:36:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Are you talking about Windows .BMP format?  Does MS Paint load the Gimp images?  If so, I&#39;d have to say it&#39;s Allegro&#39;s fault.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Fri, 26 Jul 2013 10:59:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><a href="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/2/4/24d3dfc7d027aac01d19ab260dcf7af7.bmp">607849</a></p><p><a href="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/7/5/75d920cf5c15ba93c9a273a45d24a231.bmp">607850</a></p><p>Well, that is possible that it is Allegro&#39;s fault.</p><p>MS Paint does load the &quot;bad&quot; GIMP bitmaps, but once MS Paint saves the exact picture, they are definitely different in structure and size. (see attached.)</p><p>It appears that the GIMP version adds additional data to the header section. Perhaps it&#39;s in a different &quot;bitmap version header&quot; (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 &quot;BGRs.&quot;</p><p>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, <b>and</b> 16-bit exports and none of them would load under Allegro.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Chris Katko)</author>
		<pubDate>Fri, 26 Jul 2013 11:50:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>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&#39;t use the bottom-to-top encoding. So far it seems to be very classic.<br />Grafx2 loads them fine, and its BMP-loading function is here (Load_BMP) :<br /><a href="http://grafx2.googlecode.com/svn/trunk/src/fileformats.c">http://grafx2.googlecode.com/svn/trunk/src/fileformats.c</a></p><p><b>edit</b> after further research:<br />Looking at the source code of Allegro v4.4.2, load_bmp() only accepts the variants where the header has size 12 (a so-called OS/2 bitmap header) and a header of size 40 (BITMAPINFOHEADER). It will refuse other formats, most notably the V4 and V5 variants added by Microsoft at the time of WinNT/95 and Windows 98 respectively.<br />(If you open images with a hex editor, the DIB header size is at offset 14: 0x28 = 40 = OK for allegro 4, 0x6C = 108 = KO for allegro 4)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Audric)</author>
		<pubDate>Sat, 27 Jul 2013 00:46:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Allegro 5 should be able to load it. A4 is from like the 1990s, no big surprise newer formats are not supported.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Sat, 27 Jul 2013 00:50:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>This is a known problem.<br />Allegro&#39;s builtin BMP image loader doesn&#39;t support newest format.</p><p>gimp 2.8 defaults to new version of BMP format by default (ver 5 if memory serves).<br />If you want the old format, when you export to BMP, <br />make sure this option is checked (see attached pic):</p><p>Compatibility Options &gt; Do not write color space information</p><p>This will create BMP files compatible with Allegro4 and Allegro5 image loader code.</p><p>If you decide to upgrade to Allegro5 you&#39;ll want to disable the native image loading when building the libaray, in order to read those old-format BMP&#39;s.<br />If you&#39;re trying to be cross-platform you may run into issues.<br />eg: I couldn&#39;t load BMP images with the android port.</p><p>Cheers,<br />Pho75.</p><p>P.S: I fought with all this earlier, gave up and switched to PNG.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Pho75_)</author>
		<pubDate>Sat, 27 Jul 2013 03:31:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>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.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Wang)</author>
		<pubDate>Sat, 27 Jul 2013 11:36:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>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 &quot;save as&quot; in older versions of GIMP), the last pop-up dialog before saving will have an &quot;Advanced Options&quot; 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.</p><p>I haven&#39;t used Allegro 5, so I can&#39;t say if it has the same problem.</p><p>Edit: Reading your second post, I see you&#39;ve tried different bit depths. But I&#39;ll leave this post as-is for anyone who may need to know this information.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (pellea72)</author>
		<pubDate>Sat, 27 Jul 2013 16:09:10 +0000</pubDate>
	</item>
</rss>
