<div dir="ltr">Progress! Using Andreas' suggestion:<div><br><div><i>changing the typedef in line 91 of mapagg.cpp from<br>  typedef mapserver::renderer_scanline_aa_solid<renderer_base> renderer_scanline;<br>to<br>  typedef mapserver::renderer_scanline_bin_solid<renderer_base> renderer_scanline;</i><br></div><div><br></div><div>My test image went from 127kB down to 23.3kB!</div></div><div><br></div><div>Rich</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 17, 2021 at 7:58 AM Eichner, Andreas - SID <<a href="mailto:Andreas.Eichner@sid.sachsen.de">Andreas.Eichner@sid.sachsen.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Jukka,<br>
<br>
as a result of the discussion IMO Erik created a patch to be able to switch AGGs anti-aliasing on and off using the ANTIALIAS keyword. This was merged by Even Rouault in <a href="https://github.com/MapServer/MapServer/pull/6225" rel="noreferrer" target="_blank">https://github.com/MapServer/MapServer/pull/6225</a><br>
It originally worked IMHO only for lines styles. But GAMMA is __not__ the way to turn anti-aliasing off.<br>
<br>
Greets, Andreas<br>
<br>
-----Ursprüngliche Nachricht-----<br>
Von: mapserver-users <<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a>> Im Auftrag von Rahkonen Jukka (MML)<br>
Gesendet: Montag, 17. Mai 2021 15:26<br>
An: Rahkonen Jukka (MML) <<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi" target="_blank">jukka.rahkonen@maanmittauslaitos.fi</a>>; Mapserver-Users (<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a>) <<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a>><br>
Betreff: Re: [mapserver-users] differing image size with different mapserver versions<br>
<br>
Hi,<br>
<br>
<br>
<br>
Here is a long thread about turning off antialias <a href="http://osgeo-org.1560.x6.nabble.com/Draw-roads-WITHOUT-anti-aliasing-td5338614.html" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.nabble.com/Draw-roads-WITHOUT-anti-aliasing-td5338614.html</a> <<a href="http://osgeo-org.1560.x6.nabble.com/Draw-roads-WITHOUT-anti-aliasing-td5338614.html" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.nabble.com/Draw-roads-WITHOUT-anti-aliasing-td5338614.html</a>> .<br>
<br>
<br>
<br>
I had the same wrong idea about gamma=0 back then but perhaps gamma=0.01 could work.<br>
<br>
<br>
<br>
-Jukka Rahkonen-<br>
<br>
<br>
<br>
Lähettäjä: mapserver-users <<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a>> Puolesta Rahkonen Jukka (MML)<br>
Lähetetty: maanantai 17. toukokuuta 2021 16.06<br>
Vastaanottaja: Mapserver-Users (<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a>) <<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a>><br>
Aihe: Re: [mapserver-users] differing image size with different mapserver versions<br>
<br>
<br>
<br>
Hi,<br>
<br>
<br>
<br>
(Re-sent as edited to mailing list because the body was originally too long.<br>
<br>
<br>
<br>
Are you sure about “I actually found that 6.4 produced small, aliased images with both the GD and AGG drivers”.  Originally the AGG library could only do anti-aliasing and that affected also Mapserver 5 <a href="https://lists.osgeo.org/pipermail/mapserver-users/2007-September/025467.html" rel="noreferrer" target="_blank">https://lists.osgeo.org/pipermail/mapserver-users/2007-September/025467.html</a> <<a href="https://lists.osgeo.org/pipermail/mapserver-users/2007-September/025467.html" rel="noreferrer" target="_blank">https://lists.osgeo.org/pipermail/mapserver-users/2007-September/025467.html</a>> .<br>
<br>
<br>
<br>
I guess that Mapnik folks have since that added support for controlling anti-aliasing with gamma setting <a href="http://mapnik.org/mapnik-reference/" rel="noreferrer" target="_blank">http://mapnik.org/mapnik-reference/</a>.<br>
<br>
I can see that gamma can be used also with Mapserver <a href="https://www.mapserver.org/mapfile/outputformat.html" rel="noreferrer" target="_blank">https://www.mapserver.org/mapfile/outputformat.html</a><br>
<br>
<br>
<br>
Have a try with gamma=0. However, Even wrote that turning off antialiasing is possible only in master, so perhaps gamma=0 does not work.<br>
<br>
<br>
<br>
The documentation for Mapserver 5 tells that “All ANTIALIAS keywords are now ignored". But the keyword still appears in quite a many places:<br>
<br>
<a href="https://mapserver.org/search.html?q=antialias" rel="noreferrer" target="_blank">https://mapserver.org/search.html?q=antialias</a><br>
<br>
<br>
<br>
Would it be time to remove them as well as now not useful references to GD renderer (removed by RFC 99 in 2013)?<br>
<br>
<br>
<br>
-Jukka Rahkonen-<br>
<br>
<br>
<br>
<br>
<br>
Lähettäjä: mapserver-users <<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a> <mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a>> > Puolesta Richard Greenwood<br>
Lähetetty: maanantai 17. toukokuuta 2021 15.26<br>
Kopio: <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a> <mailto:<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a>> <br>
Aihe: Re: [mapserver-users] differing image size with different mapserver versions<br>
<br>
<br>
<br>
Thanks for the suggestions. The consensus seems to be that anti-aliasing is causing the increased size. The documentation here <<a href="https://mapserver.org/output/antialias.html" rel="noreferrer" target="_blank">https://mapserver.org/output/antialias.html</a>>  says "Since version 6.0, MapServer will produce aliased output for the “gd/” drivers, and antialiased output for the “agg/” and “cairo/” ones" and it's also mentioned here <<a href="https://lists.osgeo.org/pipermail/mapserver-users/2012-April/072011.html" rel="noreferrer" target="_blank">https://lists.osgeo.org/pipermail/mapserver-users/2012-April/072011.html</a>>  in Thomas Bonfort's reply. I actually found that 6.4 produced small, aliased images with both the GD and AGG drivers and regardless of my ANTIALIAS true/false setting. <br>
<br>
<br>
<br>
Would anyone consider re-enabling the ANTIALIAS true/false option?<br>
<br>
<br>
<br>
Thanks,<br>
<br>
Rich<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Richard W. Greenwood, PLS<br><a href="http://www.greenwoodmap.com" target="_blank">www.greenwoodmap.com</a></div></div>