[MS4W-Users] [ms4w-users] agg + transparency + quantize not working
Tiemens, Gerben
Gerben.Tiemens at grontmij.nl
Thu Nov 5 10:20:44 EST 2009
In addition to previous email : further testing revealed that the transparent color is always black.
So if I set
imagecolor 99 99 99
transparent = true
And outputformat to:
OUTPUTFORMAT
NAME "PNG_mapscript"
MIMETYPE "image/png"
DRIVER "GD/PNG"
EXTENSION "PNG"
IMAGEMODE "RGBA"
TRANSPARENT TRUE
FORMATOPTION "QUANTIZE_FORCE=on"
FORMATOPTION "QUANTIZE_COLORS=256"
FORMATOPTION "QUANTIZE_NEW=on"
END
The image appears grey.
The black labels with white backgroundcolor and black shadowcolor in original image are mapped to: white background with gray outline characters and transparent filling and the shadow is grayoutlined with transparent filling. Probably the antialiasing generates the grey outline, the black filling is converted to transparent.
Something is going wrong.
If I set output format to:
OUTPUTFORMAT
NAME "PNG_mapscript"
MIMETYPE "image/png; mode=24bit"
DRIVER "AGG/PNG"
EXTENSION "PNG"
IMAGEMODE "RGBA"
TRANSPARENT TRUE
FORMATOPTION "QUANTIZE_FORCE=on"
FORMATOPTION "QUANTIZE_DITHER=off"
FORMATOPTION "QUANTIZE_COLORS=256"
END
The same applies for the text/labels, but background of the image is now black in all circumstances (no matter what color of imagecolor setting.
Greetings
Gerben
-----Oorspronkelijk bericht-----
Van: ms4w-users-bounces at lists.maptools.org [mailto:ms4w-users-bounces at lists.maptools.org] Namens G. Tiemens
Verzonden: Thursday, November 05, 2009 1:46 PM
Aan: ms4w-users at lists.maptools.org
Onderwerp: [MS4W-Users] [ms4w-users] agg + transparency + quantize not working
I am busy writing a application with mapscript in C#.
Currently I am facing the earlier mentioned problems of agg + transparent images + quantization.
Is the new MS4W compiled with the quantization options?
The image background is now Black. The labels are dissapearing.
It should be an image wich is completly transparent with some colored lines and some black labels.
Setting the imagecolor will not help me.
Images without quantization options on, are perfect and beautiful png's.
What I am using now is this:
MS4W 3.0 Beta 7
C# mapscript
Mapfile is completely written in C#, so all default options apply.
I saved
MAP
EXTENT 104952 495303 105452 495803
IMAGECOLOR 255 255 255
IMAGETYPE gif
SIZE 2000 2000
STATUS ON
UNITS METERS
NAME "MS"
OUTPUTFORMAT
NAME "PNG_mapscript"
MIMETYPE "image/png; mode=24bit"
DRIVER "AGG/PNG"
EXTENSION "PNG"
IMAGEMODE "RGBA"
TRANSPARENT TRUE
FORMATOPTION "QUANTIZE_FORCE=on"
FORMATOPTION "QUANTIZE_DITHER=off"
FORMATOPTION "QUANTIZE_COLORS=256"
END
SYMBOL
NAME "circle"
TYPE ELLIPSE
FILLED TRUE
POINTS
1 1
END
END
--
*snip*
--
END
--
View this message in context: http://old.nabble.com/agg-%2B-transparency-%2B-quantize-not-working-tp26213640p26213640.html
Sent from the ms4w-users mailing list archive at Nabble.com.
_______________________________________________
MS4W-Users mailing list
MS4W-Users at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/ms4w-users
<< Please read our E-mail Disclaimer at: Emaildisclaimer.Grontmij.com >>
More information about the MS4W-Users
mailing list