<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Loading .png Files in Allegro 5</title>
		<link>http://www.allegro.cc/forums/view/608505</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Tue, 04 Oct 2011 05:11:19 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m having trouble finding resources explaining how to load .png files with Allegro 5. When I installed it, I thought that it was supported without external libraries, but I see that that doesn&#39;t seem to be the case. Can someone explain to me what libraries I need, where I can get them, and how to install them?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (therpgmaker)</author>
		<pubDate>Mon, 03 Oct 2011 09:08:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The included readme file and the manual explains that. Try reading them.</p><p>If you are using prebuilt binaries on a.cc, then it is included (along with everything else).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Mon, 03 Oct 2011 09:11:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ok, I installed libz and libpng, and added them (libz.dll.a and libpng.dll.a) to the linker settings. I #include &lt;png.h&gt;. I still get a null value when I try to load a .png file.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (therpgmaker)</author>
		<pubDate>Tue, 04 Oct 2011 04:03:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You don&#39;t need to install anything besides Allegro 5. </p><p>Use the Allegro 5 <a href="http://www.allegro.cc/files/">pre-built</a> binaries and that&#39;s it.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Tue, 04 Oct 2011 04:20:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>There is no need to include those header files, as you are not calling any PNG specific functions. See:</p><p><a href="http://wiki.allegro.cc/index.php?title=Loading_Resources_(Troubleshooting)">http://wiki.allegro.cc/index.php?title=Loading_Resources_(Troubleshooting)</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Tue, 04 Oct 2011 04:22:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/608505/933005#target">therpgmaker</a> said:</div><div class="quote"><p>
Ok, I installed libz and libpng, and added them (libz.dll.a and libpng.dll.a) to the linker settings. I #include &lt;png.h&gt;. I still get a null value when I try to load a .png file.
</p></div></div><p>
If you built A5 yourself, you will need to delete CMakeCache.txt and rebuild it from scratch, or else png support won&#39;t be built into it. If you&#39;re using the prebuilt binaries, then you&#39;re ready to go.</p><p>After that, you need to include &lt;allegro5/allegro_image.h&gt;, initialize allegro and the image addon, and then load your png file normally using al_load_bitmap.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Tue, 04 Oct 2011 04:36:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks, that was it. I got it working.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (therpgmaker)</author>
		<pubDate>Tue, 04 Oct 2011 05:11:19 +0000</pubDate>
	</item>
</rss>
