Re: [mapserver-users] anti-aliasing (was differing image size with different mapserver versions)

2021-05-19 Thread Richard Greenwood
Andreas, Very interesting. Your Cairo driver modifications create an image the same size as your AGG driver modification that disables AA, but with strikingly different appearance. Links to examples below. (The examples are pretty ugly but with some work on the styles in the map file they could

Re: [mapserver-users] anti-aliasing (was differing image size with different mapserver versions)

2021-05-19 Thread Steve Lime
Worth adding to main? On Wed, May 19, 2021 at 10:15 AM Eichner, Andreas - SID < andreas.eich...@sid.sachsen.de> wrote: > If you want to give Cairo a try, you could modify mapcairo.c like this: > > diff --git a/mapcairo.c b/mapcairo.c > index 0f4cc094..d28947d6 100644 > --- a/mapcairo.c > +++

Re: [mapserver-users] anti-aliasing (was differing image size with different mapserver versions)

2021-05-19 Thread Eichner, Andreas - SID
If you want to give Cairo a try, you could modify mapcairo.c like this: diff --git a/mapcairo.c b/mapcairo.c index 0f4cc094..d28947d6 100644 --- a/mapcairo.c +++ b/mapcairo.c @@ -517,6 +517,12 @@ imageObj* createImageCairo(int width, int height, outputFormatObj *format,colorO

Re: [mapserver-users] anti-aliasing (was differing image size with different mapserver versions)

2021-05-19 Thread Eichner, Andreas - SID
This should make the keyword ANTIALIAS in line styles work as expected and draw linestrings aliased if set to FALSE. But this works not only be adding another typedef. It also adds another member of that type and to use it the agg2Render*-methods need to selectively switch between the both

Re: [mapserver-users] anti-aliasing (was differing image size with different mapserver versions)

2021-05-19 Thread Richard Greenwood
Andreas, I have built a version of MapServer without AA enabled in mapagg.cpp as you have suggested. The reduction in file size is remarkable. In some cases it is 1/2 the size of a GD/GIF or an optimized AGG/PNG8. Aesthetically the images are pretty bad at first, but by softening the colors in

Re: [mapserver-users] anti-aliasing (was differing image size with different mapserver versions)

2021-05-19 Thread Rahkonen Jukka (MML)
Hi, Can someone say if the issue is already fixed or not by https://github.com/MapServer/MapServer/pull/6225/files that adds: typedef mapserver::renderer_scanline_bin_solid renderer_scanline_aliased; Is this enough for turning antialiasing off and making png files with lots of linework

Re: [mapserver-users] anti-aliasing (was differing image size with different mapserver versions)

2021-05-19 Thread Eichner, Andreas - SID
What AGG does with it's sub-pixel accuracy can be viewed as computing the contribution of the pixels of a virtually larger image to the pixels of the final image. It uses a gamma function to translate the amount of virtual pixels into an amount of visual impact on the final pixel - both