<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3314" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Verdana size=2>
<DIV><FONT face=Verdana size=2><SPAN 
class=919540221-22042008>Hi,</SPAN></FONT></DIV>
<DIV><FONT face=Verdana size=2><SPAN 
class=919540221-22042008></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana size=2><SPAN class=919540221-22042008>I'm trying to use 
my own palette for AGG as described here&nbsp;by 
Thomas&nbsp;:</SPAN></FONT></DIV>
<DIV><FONT face=Verdana size=2><SPAN class=919540221-22042008><A 
href="http://www.nabble.com/forced-palette-and-quantization-for-RGBA-images-td14645869.html">http://www.nabble.com/forced-palette-and-quantization-for-RGBA-images-td14645869.html</A></SPAN></FONT></DIV>
<DIV><FONT face=Verdana size=2><SPAN 
class=919540221-22042008></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana size=2><SPAN class=919540221-22042008>As explained in 
the article, I'm using&nbsp;a typical PNG 24 bits image (produced in RGBA mode - 
4 bands).</SPAN></FONT></DIV>
<DIV><FONT face=Verdana size=2><SPAN class=919540221-22042008>But from this 
image,&nbsp;</SPAN></FONT><FONT face=Verdana size=2><SPAN 
class=919540221-22042008>I'm not able to produce a 8 bits PNG image with the 
ALPHA, only in RGB with 3 channels - s</SPAN></FONT><FONT face=Verdana 
size=2><SPAN class=919540221-22042008>ee the GDALINFO below.</SPAN></FONT></DIV>
<DIV><FONT face=Verdana size=2><SPAN class=919540221-22042008>I need this 8 bits 
image to generate my palette.</SPAN></FONT></DIV>
<DIV><FONT face=Verdana size=2><SPAN 
class=919540221-22042008></SPAN></FONT><FONT face=Verdana size=2><SPAN 
class=919540221-22042008></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" color=#0000ff size=2><SPAN 
class=919540221-22042008>gdalinfo rgb.png<BR>Driver: PNG/Portable Network 
Graphics<BR>Size is 1203, 813<BR>Coordinate System is `'<BR>Corner 
Coordinates:<BR>Upper Left&nbsp; (&nbsp;&nbsp;&nbsp; 0.0,&nbsp;&nbsp;&nbsp; 
0.0)<BR>Lower Left&nbsp; (&nbsp;&nbsp;&nbsp; 0.0,&nbsp; 813.0)<BR>Upper Right ( 
1203.0,&nbsp;&nbsp;&nbsp; 0.0)<BR>Lower Right ( 1203.0,&nbsp; 
813.0)<BR>Center&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&nbsp; 601.5,&nbsp; 
406.5)<BR>Band 1 Block=1203x1 Type=Byte, ColorInterp=Palette<BR>&nbsp; Color 
Table (RGB with 256 entries)</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" color=#0000ff size=2><SPAN 
class=919540221-22042008>&nbsp;&nbsp;&nbsp; 0: 
17,12,12,255<BR>&nbsp;&nbsp;&nbsp; 1: 27,101,44,255<BR>&nbsp;&nbsp;&nbsp; 2: 
0,132,0,255<BR>&nbsp;&nbsp;&nbsp; 3: 19,130,16,255</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff><FONT face=Verdana size=2><SPAN 
class=919540221-22042008><FONT 
color=#000000>...</FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT color=#0000ff><FONT face=Verdana size=2><SPAN 
class=919540221-22042008><FONT 
color=#000000></FONT></SPAN></FONT></FONT>&nbsp;</DIV>
<DIV><FONT color=#0000ff><FONT face=Verdana size=2><SPAN 
class=919540221-22042008><FONT color=#000000>How can&nbsp;I generate a 8 bits 
RGBA image&nbsp;from the original 24 bits 
image&nbsp;?</FONT></DIV></SPAN></FONT></FONT>
<DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=919540221-22042008><FONT face=Verdana 
size=2>Regards.</FONT></SPAN></DIV></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV class=Section1>
<P align=left><SPAN lang=FR-CA 
style="COLOR: navy; FONT-FAMILY: 'Arial Black'; mso-ansi-language: FR-CA">______________________________________________________</SPAN></P>
<P><SPAN lang=FR-CA 
style="COLOR: navy; FONT-FAMILY: 'Arial Black'; mso-ansi-language: FR-CA"><FONT 
size=2><FONT face=Verdana><FONT size=4><STRONG>JAMES 
LÉVEILLÉ<BR></STRONG></FONT>Service des systèmes de Mission<BR>Direction des 
technologies de l'information<BR>Ministère des Transports du 
Québec</FONT></FONT></SPAN></P>
<P><SPAN lang=FR-CA 
style="COLOR: navy; FONT-FAMILY: 'Arial Black'; mso-ansi-language: FR-CA"><FONT 
face=Verdana size=2>5833, boul. Pierre-Bertrand, 2ième étage<BR>Québec (Québec) 
G2K 1K7<BR>Téléphone:&nbsp;&nbsp; (418) 380-2005 poste 227<BR>Télécopieur: (418) 
644-6653<BR><A href="mailto:james.leveille@mtq.gouv.qc.ca"><FONT 
color=#000080>james.leveille@mtq.gouv.qc.ca</FONT></A><BR></FONT></SPAN></P>
<P><FONT color=#000080></FONT>&nbsp;</P></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>