[mapserver-users] differing image size with different mapserver versions

Richard Greenwood richard.greenwood at gmail.com
Mon May 17 07:11:02 PDT 2021


Progress! Using Andreas' suggestion:




*changing the typedef in line 91 of mapagg.cpp from  typedef
mapserver::renderer_scanline_aa_solid<renderer_base> renderer_scanline;to
typedef mapserver::renderer_scanline_bin_solid<renderer_base>
renderer_scanline;*

My test image went from 127kB down to 23.3kB!

Rich

On Mon, May 17, 2021 at 7:58 AM Eichner, Andreas - SID <
Andreas.Eichner at sid.sachsen.de> wrote:

> Hi Jukka,
>
> 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 https://github.com/MapServer/MapServer/pull/6225
> It originally worked IMHO only for lines styles. But GAMMA is __not__ the
> way to turn anti-aliasing off.
>
> Greets, Andreas
>
> -----Ursprüngliche Nachricht-----
> Von: mapserver-users <mapserver-users-bounces at lists.osgeo.org> Im Auftrag
> von Rahkonen Jukka (MML)
> Gesendet: Montag, 17. Mai 2021 15:26
> An: Rahkonen Jukka (MML) <jukka.rahkonen at maanmittauslaitos.fi>;
> Mapserver-Users (mapserver-users at lists.osgeo.org) <
> mapserver-users at lists.osgeo.org>
> Betreff: Re: [mapserver-users] differing image size with different
> mapserver versions
>
> Hi,
>
>
>
> Here is a long thread about turning off antialias
> http://osgeo-org.1560.x6.nabble.com/Draw-roads-WITHOUT-anti-aliasing-td5338614.html
> <
> http://osgeo-org.1560.x6.nabble.com/Draw-roads-WITHOUT-anti-aliasing-td5338614.html>
> .
>
>
>
> I had the same wrong idea about gamma=0 back then but perhaps gamma=0.01
> could work.
>
>
>
> -Jukka Rahkonen-
>
>
>
> Lähettäjä: mapserver-users <mapserver-users-bounces at lists.osgeo.org>
> Puolesta Rahkonen Jukka (MML)
> Lähetetty: maanantai 17. toukokuuta 2021 16.06
> Vastaanottaja: Mapserver-Users (mapserver-users at lists.osgeo.org) <
> mapserver-users at lists.osgeo.org>
> Aihe: Re: [mapserver-users] differing image size with different mapserver
> versions
>
>
>
> Hi,
>
>
>
> (Re-sent as edited to mailing list because the body was originally too
> long.
>
>
>
> 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
> https://lists.osgeo.org/pipermail/mapserver-users/2007-September/025467.html
> <
> https://lists.osgeo.org/pipermail/mapserver-users/2007-September/025467.html>
> .
>
>
>
> I guess that Mapnik folks have since that added support for controlling
> anti-aliasing with gamma setting http://mapnik.org/mapnik-reference/.
>
> I can see that gamma can be used also with Mapserver
> https://www.mapserver.org/mapfile/outputformat.html
>
>
>
> 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.
>
>
>
> The documentation for Mapserver 5 tells that “All ANTIALIAS keywords are
> now ignored". But the keyword still appears in quite a many places:
>
> https://mapserver.org/search.html?q=antialias
>
>
>
> Would it be time to remove them as well as now not useful references to GD
> renderer (removed by RFC 99 in 2013)?
>
>
>
> -Jukka Rahkonen-
>
>
>
>
>
> Lähettäjä: mapserver-users <mapserver-users-bounces at lists.osgeo.org
> <mailto:mapserver-users-bounces at lists.osgeo.org> > Puolesta Richard
> Greenwood
> Lähetetty: maanantai 17. toukokuuta 2021 15.26
> Kopio: mapserver-users at lists.osgeo.org <mailto:
> mapserver-users at lists.osgeo.org>
> Aihe: Re: [mapserver-users] differing image size with different mapserver
> versions
>
>
>
> Thanks for the suggestions. The consensus seems to be that anti-aliasing
> is causing the increased size. The documentation here <
> https://mapserver.org/output/antialias.html>  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 <
> https://lists.osgeo.org/pipermail/mapserver-users/2012-April/072011.html>
> 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.
>
>
>
> Would anyone consider re-enabling the ANTIALIAS true/false option?
>
>
>
> Thanks,
>
> Rich
>
>
>
>
>
>
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>


-- 
Richard W. Greenwood, PLS
www.greenwoodmap.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20210517/16e4ba0d/attachment.html>


More information about the mapserver-users mailing list