<!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 "cr" (center right) of the pixmap. So, if the original pixmap is scaled, only the "cr"-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"> OUTPUTFORMAT</FONT>
<BR><FONT SIZE=2 FACE="Arial"> #NAME png</FONT>
<BR><FONT SIZE=2 FACE="Arial"> #DRIVER "GD/PNG"</FONT>
<BR><FONT SIZE=2 FACE="Arial"> MIMETYPE "image/png"</FONT>
<BR><FONT SIZE=2 FACE="Arial"> NAME 'AGG_Q'</FONT>
<BR><FONT SIZE=2 FACE="Arial"> DRIVER AGG/PNG</FONT>
<BR><FONT SIZE=2 FACE="Arial"> EXTENSION PNG</FONT>
<BR><FONT SIZE=2 FACE="Arial"> IMAGEMODE RGBA </FONT>
<BR><FONT SIZE=2 FACE="Arial"> TRANSPARENT ON </FONT>
<BR><FONT SIZE=2 FACE="Arial"> END</FONT>
<BR><FONT SIZE=2 FACE="Arial"> </FONT>
<BR><FONT SIZE=2 FACE="Arial">LEGEND</FONT>
<BR><FONT SIZE=2 FACE="Arial"> STATUS ON</FONT>
<BR><FONT SIZE=2 FACE="Arial"> #KEYSIZE 55 40</FONT>
<BR><FONT SIZE=2 FACE="Arial"> KEYSIZE 200 520</FONT>
<BR><FONT SIZE=2 FACE="Arial"> KEYSPACING 10 5</FONT>
<BR><FONT SIZE=2 FACE="Arial"> LABEL</FONT>
<BR><FONT SIZE=2 FACE="Arial"> COLOR 0 0 0</FONT>
<BR><FONT SIZE=2 FACE="Arial"> TYPE TRUETYPE</FONT>
<BR><FONT SIZE=2 FACE="Arial"> FONT "verdana"</FONT>
<BR><FONT SIZE=2 FACE="Arial"> SIZE 8</FONT>
<BR><FONT SIZE=2 FACE="Arial"> END # END LABEL</FONT>
<BR><FONT SIZE=2 FACE="Arial"> TRANSPARENT ON</FONT>
<BR><FONT SIZE=2 FACE="Arial"> IMAGECOLOR 255 255 255</FONT>
<BR><FONT SIZE=2 FACE="Arial">END #LEGEND</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">….</FONT>
<BR><FONT SIZE=2 FACE="Arial">LAYER ...</FONT>
<BR><FONT SIZE=2 FACE="Arial"> CLASS</FONT>
<BR><FONT SIZE=2 FACE="Arial"> NAME "Stadtplan farbig"</FONT>
<BR><FONT SIZE=2 FACE="Arial"> KEYIMAGE "/data/raster/stadtplan/stadtplan_legende_hoch.png"</FONT>
<BR><FONT SIZE=2 FACE="Arial"> END </FONT>
<BR><FONT SIZE=2 FACE="Arial">….</FONT>
<BR><FONT SIZE=2 FACE="Arial">END # LAYER</FONT>
<BR><FONT SIZE=2 FACE="Arial">…..</FONT>
</P>
</BODY>
</HTML>