<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>load image from external lib?</title>
		<link>http://www.allegro.cc/forums/view/613437</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Tue, 29 Oct 2013 22:38:25 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>hi all:</p><p>how can I load image from external lib (ex. freeimage) in allegro 5?<br />or <br />how can I convert a buffer with rgba image data to ALLEGRO_BITMAP?</p><p>thanks
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (tom01 ms41)</author>
		<pubDate>Mon, 28 Oct 2013 22:45:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><span class="source-code"><a href="http://www.allegro.cc/manual/al_lock_bitmap"><span class="a">al_lock_bitmap</span></a></span> with the format set to ABGR_LE is what I use. It expects data bytes for red, green, blue, alpha in that order.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Mon, 28 Oct 2013 22:58:20 +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/613437/991843#target">tom01 ms41</a> said:</div><div class="quote"><p>
how can I convert a buffer with rgba image data to ALLEGRO_BITMAP?
</p></div></div><p>
Here is what I use:
</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/ALLEGRO_FILE"><span class="a">ALLEGRO_FILE</span></a><span class="k3">*</span> f <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_open_memfile"><span class="a">al_open_memfile</span></a><span class="k2">(</span>buffer,size,<span class="s">"r"</span><span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/ALLEGRO_BITMAP"><span class="a">ALLEGRO_BITMAP</span></a><span class="k3">*</span> btmp <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_load_bitmap_f"><span class="a">al_load_bitmap_f</span></a><span class="k2">(</span>f,extension<span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/al_fclose"><span class="a">al_fclose</span></a><span class="k2">(</span>f<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
EDIT: Nevermind, it won&#39;t work, I actually have whole file in memory, not just rgba image data.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Aikei_c)</author>
		<pubDate>Tue, 29 Oct 2013 22:38:25 +0000</pubDate>
	</item>
</rss>
