<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Transaparent logo. My brain is dead :-(</title>
		<link>http://www.allegro.cc/forums/view/581147</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Thu, 27 Apr 2006 00:30:31 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Please help<br />I have background and logo ( all 32bit )<br />My code:<br />--------------------------------------------<br />BITMAP *bg,*logo;</p><p>set_color_depth(32);<br />set_palette(desktop_palette);<br />set_gfx_mode(GFX_AUTODETECT_WINDOWED, 800, 600, 0, 0);</p><p>logo=load_bitmap(&quot;logo.bmp&quot;,NULL);<br />bg=load_bitmap(&quot;bg.bmp&quot;,NULL);<br />while (1){<br />       blit(bg, buffer, 0, 0, 0, 0, SCREEN_W, SCREEN_H);<br />       masked_blit(logo, buffer, 0, 0, 0, 0, SCREEN_W, SCREEN_H);<br />       blit(buffer,screen ,0, 0, 0, 0, SCREEN_W, SCREEN_H);<br />       if (key[KEY_ESC]){break;}<br />}<br />--------------------------------------------</p><p>This is my result : <a href="http://www.hostfornet.net/vasilevs/problem.htm">http://www.hostfornet.net/vasilevs/problem.htm</a><br />I loking in this forum but not found solution ... :-(<br />Please help </p><p>***********<br />&#1055;&#1088;&#1080;&#1074;&#1077;&#1090; &#1088;&#1091;&#1089;&#1089;&#1082;o&#1103;&#1079;&#1099;&#1095;&#1085;&#1099;&#1084; &#1082;o&#1076;&#1077;&#1088;&#1072;&#1084; &#1087;&#1083;&#1072;&#1085;&#1077;&#1090;&#1099; ! :-)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bob Bobosky)</author>
		<pubDate>Mon, 24 Apr 2006 02:01:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The problem is the shadow is not proper bright pink. For it to be transparent it needs to be exactly 255,0,255. While the shadow you have is a combination of the bright pink with black.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (umperio)</author>
		<pubDate>Mon, 24 Apr 2006 02:05:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The solution: save your image as a 32-bit RGBA image and render it with set_alpha_blender/draw_trans_sprite.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Fladimir da Gorf)</author>
		<pubDate>Mon, 24 Apr 2006 02:06:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>btw, you don&#39;t need set_palette if you&#39;re working with 32 bit. If you have 8bit graphics they are dealt with by the colour conversion global.</p><p>You could always try the png library extension.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Mon, 24 Apr 2006 03:49:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Bob, use the code tags around your code. You can reference tags by the <a href="http://www.allegro.cc/mockup.html">HTML Mockup Code</a> link at the top of the reply text input.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ceagon Xylas)</author>
		<pubDate>Mon, 24 Apr 2006 04:11:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><b>umperio</b>, I know about this problem but i need shadows etc.</p><p><b>Fladimir da Gorf</b>,  I create my images in Photoshop CS 9  . My experience in C very poor ( as my english :-) . And i don&#39;t uses BMP files ( i&#39;m PHP/Perl coder over 7 years ) and i don&#39;t know how create like this format file :-(<br />Please look at this 2 bmp files : <a href="http://www.hostfornet.net/vasilevs/imgs.zip">http://www.hostfornet.net/vasilevs/imgs.zip</a><br />It is RGBA image ?<br />And this my code don&#39;t work with these images:-(</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td><span class="p">#include &lt;allegro.h&gt;</span></td></tr><tr><td class="number">2</td><td><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>logo<span class="k2">;</span></td></tr><tr><td class="number">3</td><td><span class="k1">int</span> main<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span></td></tr><tr><td class="number">4</td><td><span class="k2">{</span></td></tr><tr><td class="number">5</td><td>    <a href="http://www.allegro.cc/manual/allegro_init" target="_blank"><span class="a">allegro_init</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>  </td></tr><tr><td class="number">6</td><td>    <a href="http://www.allegro.cc/manual/install_timer" target="_blank"><span class="a">install_timer</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>     </td></tr><tr><td class="number">7</td><td>    <a href="http://www.allegro.cc/manual/install_keyboard" target="_blank"><span class="a">install_keyboard</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">8</td><td>    <a href="http://www.allegro.cc/manual/set_color_depth" target="_blank"><span class="a">set_color_depth</span></a><span class="k2">(</span><span class="n">32</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">9</td><td>    <a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_AUTODETECT_WINDOWED, <span class="n">800</span>, <span class="n">600</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">10</td><td>    logo<span class="k3">=</span><a href="http://www.allegro.cc/manual/load_bitmap" target="_blank"><span class="a">load_bitmap</span></a><span class="k2">(</span><span class="s">"logo1.bmp"</span>,NULL<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">11</td><td>    <a href="http://www.allegro.cc/manual/set_alpha_blender" target="_blank"><span class="a">set_alpha_blender</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">12</td><td>    <a href="http://www.allegro.cc/manual/draw_trans_sprite" target="_blank"><span class="a">draw_trans_sprite</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, logo, <span class="n">10</span>, <span class="n">10</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">13</td><td>    <a href="http://www.allegro.cc/manual/readkey" target="_blank"><span class="a">readkey</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">14</td><td>    <a href="http://www.allegro.cc/manual/destroy_bitmap" target="_blank"><span class="a">destroy_bitmap</span></a><span class="k2">(</span>logo<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">15</td><td><span class="k2">}</span></td></tr><tr><td class="number">16</td><td><a href="http://www.allegro.cc/manual/END_OF_MAIN" target="_blank"><span class="a">END_OF_MAIN</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr></tbody></table></div></div><p>

Please , show me any working code , may be i understand it (set_alpha_blender,draw_trans_sprite)</p><p><b>Neil Walker</b>, I try libpng but not working<br />Do you have any working code ?</p><p>Thank you all for reply
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bob Bobosky)</author>
		<pubDate>Mon, 24 Apr 2006 05:38:17 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>In Photoshop, delete the pink layer (which is probably the surface layer). Then save your image as a .tga instead of .bmp.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Fladimir da Gorf)</author>
		<pubDate>Mon, 24 Apr 2006 12:11:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>This picture in this format ?<br /><a href="http://www.hostfornet.net/vasilevs/logo.tga">http://www.hostfornet.net/vasilevs/logo.tga</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bob Bobosky)</author>
		<pubDate>Mon, 24 Apr 2006 20:55:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yeah, but you need to make the background translucent (thus, delete background layer).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Fladimir da Gorf)</author>
		<pubDate>Mon, 24 Apr 2006 21:50:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I make picture but without background translucent :-(<br />Please, look at my steps: <a href="http://www.hostfornet.net/vasilevs/photoshop/photoshop.htm">http://www.hostfornet.net/vasilevs/photoshop/photoshop.htm</a></p><p>What is wrong i do ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bob Bobosky)</author>
		<pubDate>Wed, 26 Apr 2006 12:43:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ah yeah, Photoshop can&#39;t save RGBA .tga files. Well, .png files are better anyways and they work with Photoshop, but you&#39;ll need loadpng, libpng and libz -libraries to load them in your game.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Fladimir da Gorf)</author>
		<pubDate>Wed, 26 Apr 2006 14:59:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Ah yeah, Photoshop can&#39;t save RGBA .tga files.
</p></div></div><p>

It can.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Inphernic)</author>
		<pubDate>Wed, 26 Apr 2006 15:15:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>GIMP Forever :-)</p><p>Amen ! :-))</p><p>Thank you !
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bob Bobosky)</author>
		<pubDate>Wed, 26 Apr 2006 21:06:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>To create a Trasluncent TGA with photoshop you must do as I say below:</p><p>- Create your 32RGB color Bitmap, ad be sure to have upon your sprite  <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>- Look (down right) for the LEVEL manager , that is a popup with all the levels you create for yor image.</p><p>- Select in this popup window the &quot;RGB level manager&quot;. This manager should discrimiate your bitmap in the 3 color level, and you should see the RGB selection that return to all color RGB . ok, this is not so important...</p><p>- below click the icon to create a new RGB level. Automatically you will obtain a level called ALPHA. This is your level. select it, and draw Black or White if you want transparency or opacity upon your picture.</p><p>- Save this image as TGA 32 bit = 8 bit for Red/Green/Blue and 8 for alpha... 32!</p><p>- Use the Allegro command draw_trans_sprite() and you will obtain 32 transparency images. </p><p>- I used Photoshop 6.</p><p>My game has been done like this.<br />Ciao
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (LordHolNapul)</author>
		<pubDate>Thu, 27 Apr 2006 00:30:31 +0000</pubDate>
	</item>
</rss>
