<html>
<head><title></title></head>
<body><div class="iw_mail" dir="ltr">
<p style="margin:0;">Hi,</p>
<p style="margin:0;"><br></p>
<p style="margin:0;">I did some quick tests with :</p>
<p style="margin:0;"><br></p>
<p style="margin:0;">  OUTPUTFORMAT<br>    NAME "png_G0"<br>    DRIVER AGG/PNG<br>    MIMETYPE "image/png"<br>    IMAGEMODE RGB<br>    EXTENSION "png"<br>    FORMATOPTION "GAMMA=0.0"<br>  END</p>
<p style="margin:0;"><br></p>
<p style="margin:0;">and shp2img with options -i<br></p>
<p style="margin:0;">eg: shp2img -m 01_polygon_td_poly.map -o 01_polygon_td_poly.png -i png_G0<br></p>
<p style="margin:0;"><br></p>
<p style="margin:0;">I did some tests with both polygons, polygon outlines and lines and they all seems to have anti-aliasing as far as I could see.</p>
<p style="margin:0;">Would this be an ok way to test it?  I also have some people that would like to do lines without anti-aliasing for a strange reason.<br></p>
<p style="margin:0;"><br></p>
<p style="margin:0;">Lars Schylberg<br></p>
<p style="margin:0;"><br></p>
<div dir="ltr" style="font-size: 13px; font-family: Lucida Console,Courier New,Courier,Monospace;">-----Originalmeddelande-----<br>> Från: "Rahkonen Jukka (MML)" <<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi">jukka.rahkonen@maanmittauslaitos.fi</a>><br>> Till: "Eichner, Andreas - SID" <<a href="mailto:Andreas.Eichner@sid.sachsen.de">Andreas.Eichner@sid.sachsen.de</a>>, "Erik H" <<a href="mailto:erik.h11.01@gmail.com">erik.h11.01@gmail.com</a>><br>> Kopia: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>> Datum: 2017-10-18 11:13<br>> Ämne: Re: [mapserver-users] Draw roads WITHOUT anti-aliasing<br>><br>> Hi,<br>><br>> I suppose that the amount of antialiasing with AGG is set with "gamma" parameter.  Mapserver supports that at least for polygons as documented in <a href="http://www.mapserver.org/mapfile/outputformat.html">http://www.mapserver.org/mapfile/outputformat.html</a> but you could try if using gamma=0.0 has an effect on lines as well. It may be that it does not because search<br>> <a href="https://github.com/mapserver/mapserver/search?utf8=%E2%9C%93&q=gamma&type=">https://github.com/mapserver/mapserver/search?utf8=%E2%9C%93&q=gamma&type=</a><br>> seems to find only something that is tied to polygon outlines<br>> <a href="https://github.com/mapserver/mapserver/blob/branch-7-0/renderers/agg/include/agg_renderer_outline_aa.h">https://github.com/mapserver/mapserver/blob/branch-7-0/renderers/agg/include/agg_renderer_outline_aa.h</a><br>><br>><br>> If gamma does not work for lines then it could be worth making a feature request for adding a new formatoption "GAMMA_LINE=[].<br>><br>> Couple of Mapnik links dealing with the same issue:<br>> <a href="http://gis.19327.n8.nabble.com/Turning-off-anti-aliasing-td5339458.html">http://gis.19327.n8.nabble.com/Turning-off-anti-aliasing-td5339458.html</a><br>> <a href="http://mapnik.org/mapnik-reference/#3.0.6/line-gamma-method">http://mapnik.org/mapnik-reference/#3.0.6/line-gamma-method</a><br>><br>> -Jukka Rahkonen-<br>><br>><br>><br>> -----Alkuperäinen viesti-----<br>> Lähettäjä: mapserver-users [mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>] Puolesta Eichner, Andreas - SID<br>> Lähetetty: 18. lokakuuta 2017 9:57<br>> Vastaanottaja: Erik H <<a href="mailto:erik.h11.01@gmail.com">erik.h11.01@gmail.com</a>><br>> Kopio: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>> Aihe: Re: [mapserver-users] Draw roads WITHOUT anti-aliasing<br>><br>> Damn... missed attaching the images.<br>><br>> > -----Ursprüngliche Nachricht-----<br>> > Von: mapserver-users [mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>]<br>> > Im Auftrag von Eichner, Andreas - SID<br>> > Gesendet: Mittwoch, 18. Oktober 2017 08:28<br>> > An: Erik H<br>> > Cc: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>> > Betreff: Re: [mapserver-users] Draw roads WITHOUT anti-aliasing<br>> ><br>> > Hi,<br>> ><br>> > I just meant that it seems to be pretty easy to implement aliased<br>> > rendering with AGG.<br>> > Simply changing the typedef in line 91 of mapagg.cpp from<br>> ><br>> >   typedef mapserver::renderer_scanline_aa_solid<renderer_base><br>> > renderer_scanline;<br>> ><br>> > to<br>> ><br>> >   typedef mapserver::renderer_scanline_bin_solid<renderer_base><br>> > renderer_scanline;<br>> ><br>> > turns of anti-aliased rendering. I've attached the output of "shp2img<br>> > -m line_simple.map" from the msautotests.<br>> > An additional member in class AGG2Renderer for the aliased rasterizer<br>> > and conditionally passing one or the other to render_scanlines()<br>> > depending on some value of strokeStyleObj might be enough.<br>> ><br>> > Regards<br>> ><br>> > > -----Ursprüngliche Nachricht-----<br>> > > Von: Erik H [mailto:<a href="mailto:erik.h11.01@gmail.com">erik.h11.01@gmail.com</a>]<br>> > > Gesendet: Dienstag, 17. Oktober 2017 17:34<br>> > > An: Eichner, Andreas - SID<br>> > > Cc: Richard Greenwood; <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>> > > Betreff: Re: [mapserver-users] Draw roads WITHOUT anti-aliasing<br>> > ><br>> > > As for Andreas' remark about 'simply the use of another scanline<br>> > > rasterizer.' - I'm sorry but I'm not much of a C++ developer. If I<br>> > have<br>> > > to do rasterizing, I'd skip MapServer altogether and generate the<br>> > > PNG<br>> > in<br>> > > Java.<br>> > ><br>> > _______________________________________________<br>> > mapserver-users mailing list<br>> > <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>> > <a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>> _______________________________________________<br>> mapserver-users mailing list<br>> <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>> <a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</div>
<p style="margin:0;"><br></p>
<p style="margin:0;"><br></p>
<div class="signature">
<div class="separator">--</div>
<br> </div>
</div></body>
</html>