<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>Some Problems with WMS-GetLegendGraphic using agg and pixmaps</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hi list,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I have got some troubles generating legends with MS 5.0.2, used as a WMS-Server, using agg - driver and generating the legends from a pixmap with getlegendgraphic-request.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">(See the mapfile snippets below !)</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">First Problem:</FONT>

<BR><FONT SIZE=2 FACE="Arial">==========</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Using gd the pixmap referenced by KEYIMAGE is scaled to the size defined by KEYSIZE.</FONT>

<BR><FONT SIZE=2 FACE="Arial">Using agg the pixmap is NOT scaled. A part of the pixmap is shown as legend-graphic. This part is not scaled, size is 100% as in the original pixmap.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">(My pixmap is larger than the size defined by KEYSIZE)</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">Second Problem:</FONT>

<BR><FONT SIZE=2 FACE="Arial">============</FONT>

<BR><FONT SIZE=2 FACE="Arial">Scaling the original pixmap DOES NOT really solve the problem, because:</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Always only a part of the original pixmap is used for generating the legend-graphic: it is the part &quot;cr&quot; (center right) of the pixmap. So, if the original pixmap is scaled, only the &quot;cr&quot;-part is very small drawn in the legend-graphic.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">The size of the part is correct after scaling the original pixmap, but always only a part of the original pixmap is shown.</FONT></P>
<BR>

<P><FONT SIZE=2 FACE="Arial">Solution ?</FONT>

<BR><FONT SIZE=2 FACE="Arial">=======</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I think this is a bug.</FONT>

<BR><FONT SIZE=2 FACE="Arial">But if you know a workaround, please let us know !</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Thanks very much</FONT>

<BR><FONT SIZE=2 FACE="Arial">Herbert</FONT>
</P>
<BR>
<BR>
<BR>

<P><FONT SIZE=2 FACE="Arial">Mapfile Snippets:</FONT>

<BR><FONT SIZE=2 FACE="Arial">============</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">&nbsp;OUTPUTFORMAT</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp; #NAME png</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp; #DRIVER &quot;GD/PNG&quot;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp; MIMETYPE &quot;image/png&quot;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp; NAME 'AGG_Q'</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp; DRIVER AGG/PNG</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp; EXTENSION PNG</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp; IMAGEMODE RGBA </FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp; TRANSPARENT ON </FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;END</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; </FONT>

<BR><FONT SIZE=2 FACE="Arial">LEGEND</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; STATUS ON</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; #KEYSIZE 55 40</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; KEYSIZE 200 520</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; KEYSPACING 10 5</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; LABEL</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 0 0 0</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE TRUETYPE</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FONT &quot;verdana&quot;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE 8</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; END # END LABEL</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; TRANSPARENT ON</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; IMAGECOLOR 255 255 255</FONT>

<BR><FONT SIZE=2 FACE="Arial">END&nbsp;&nbsp; #LEGEND</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">&#8230;.</FONT>

<BR><FONT SIZE=2 FACE="Arial">LAYER ...</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp; CLASS</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp; NAME &quot;Stadtplan farbig&quot;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp; KEYIMAGE &quot;/data/raster/stadtplan/stadtplan_legende_hoch.png&quot;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp; END </FONT>

<BR><FONT SIZE=2 FACE="Arial">&#8230;.</FONT>

<BR><FONT SIZE=2 FACE="Arial">END # LAYER</FONT>

<BR><FONT SIZE=2 FACE="Arial">&#8230;..</FONT>
</P>

</BODY>
</HTML>