<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Strange problem with transparent png&#39;s.</title>
		<link>http://www.allegro.cc/forums/view/593049</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 05 Sep 2007 06:16:20 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Attached are two screenshots from two apps, one using allegro and the loadpng library and the other using the FOX GUI toolkit, and also the tileset itself (from RPG Maker XP) so you can see how it is supposed to look. I suspect it might be the semi transparent shadows from the trees and such that causes it, because other images with just transparent backgrounds work fine (and images similar to the attached are broken).</p><p>Anyone know what&#39;s wrong? Is my libpng broken? <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (netcat)</author>
		<pubDate>Tue, 04 Sep 2007 19:58:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Whats the problem? The gigantic black box on the right side in the Allegro application? Other than that the gui and allegro look the same to me.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (kazzmir)</author>
		<pubDate>Tue, 04 Sep 2007 23:44:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You&#39;ll see the problem if you look at the third attachment; the loaded image is all screwed up.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (netcat)</author>
		<pubDate>Wed, 05 Sep 2007 01:20:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>... all screwed up how? The third attachment looks fine to me.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (gnolam)</author>
		<pubDate>Wed, 05 Sep 2007 02:22:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The third attachment is how it&#39;s supposed to look... &quot;the loaded image&quot; = the image as it shows up in the applications.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (netcat)</author>
		<pubDate>Wed, 05 Sep 2007 02:38:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Oh, the fox gui and allegro show the sprite the same so I thought there were no problems.</p><p>Are you doing anything special to show the sprite in allegro? or is it basically
</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span> all <span class="k3">=</span> load_sprite<span class="k2">(</span> ... <span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/blit" target="_blank"><span class="a">blit</span></a><span class="k2">(</span> all, <a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, ... <span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (kazzmir)</author>
		<pubDate>Wed, 05 Sep 2007 02:44:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Simply doing
</p><div class="source-code snippet"><div class="inner"><pre>tileset <span class="k3">=</span> load_png<span class="k2">(</span> ..., <span class="n">0</span><span class="k2">)</span>
...
<a href="http://www.allegro.cc/manual/blit" target="_blank"><span class="a">blit</span></a><span class="k2">(</span>tileset, buffer, ... <span class="k2">)</span>
</pre></div></div><p>
Also, just tested loading in SDL and it works fine there.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (netcat)</author>
		<pubDate>Wed, 05 Sep 2007 02:56:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The PNG is being loaded without an alpha channel, apparently.</p><p>I don&#39;t know anything about loadpng or FOX GUI though, so I can&#39;t help more than that.</p><p>[append]</p><p><a href="http://www.allegro.cc/files/attachment/593108">Here&#39;s</a> the same image drawn with Allegro&#39;s magic pink as the background. Try using it, instead.</p><p>You will need to used masked_blit instead of blit.</p><p><span class="source-code"><a href="http://www.allegro.cc/manual/masked_blit" target="_blank"><span class="a">masked_blit</span></a></span>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Wed, 05 Sep 2007 03:18:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Convert you PNG files to TGA and load it using Allegro.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Paul whoknows)</author>
		<pubDate>Wed, 05 Sep 2007 03:26:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Converting it to TGA isn&#39;t necessary. He could keep it as PNG like I suggested in my post, or he could use Allegro&#39;s software blending techniques:</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/set_alpha_blender" target="_blank"><span class="a">set_alpha_blender</span></a>
<a href="http://www.allegro.cc/manual/draw_trans_sprite" target="_blank"><span class="a">draw_trans_sprite</span></a>
</pre></div></div><p>

[append]</p><p>I vote that we call this problem the <a href="http://en.wikipedia.org/wiki/Image:Ipu.png">Invisible Pink Unicorn Syndrome</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Wed, 05 Sep 2007 03:29:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">CGamesPlay said:</div><div class="quote"><p>

set_alpha_blender
</p></div></div><p>

Doh, hadn&#39;t noticed that function before. Calling that makes it work perfectly, obviously.</p><p>Thanks!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (netcat)</author>
		<pubDate>Wed, 05 Sep 2007 03:39:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><a href="http://www.allegro.cc/manual/api/transparency-and-patterned-drawing/">Read me.</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Paul whoknows)</author>
		<pubDate>Wed, 05 Sep 2007 06:16:20 +0000</pubDate>
	</item>
</rss>
