|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
agg + transparency + quantize not workingI 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 |
|
|
Re: [ms4w-users] agg + transparency + quantize not workingIn 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@... [mailto:ms4w-users-bounces@...] Namens G. Tiemens Verzonden: Thursday, November 05, 2009 1:46 PM Aan: ms4w-users@... 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@... http://lists.maptools.org/mailman/listinfo/ms4w-users << Please read our E-mail Disclaimer at: Emaildisclaimer.Grontmij.com >> _______________________________________________ MS4W-Users mailing list MS4W-Users@... http://lists.maptools.org/mailman/listinfo/ms4w-users |
|
|
Re: [ms4w-users] agg + transparency + quantize not workingFurther research drills down to where the problem may occur: If i test my saved mapfile from mapscript into the apache/cgi-bin/mapserv.exe The image is coming out as it should be. Transparent background, features like it should be, and text also as it should be. Am i doing something wrong in mapscript? Are there configurations that I may miss in mapscript that are default in mapserv.exe? I also don't know if this is a problem of Mapserver or MS4W, therefore crossposting it. Greetings Gerben Grontmij Gerben Tiemens GIS adviseur/ontwikkelaar GIS & ICT Grontmij Nederland B.V. B De Holle Bilt 22, 3732 HM De Bilt P Postbus 203, 3730 AE De Bilt M +31 61 334 5944 T +31 30 220 7440 F +31 30 220 1923 E Gerben.Tiemens@... W http://www.grontmij.nl Handelsregister 30129769 -----Oorspronkelijk bericht----- Van: Tiemens, Gerben Verzonden: Thursday, November 05, 2009 4:21 PM Aan: Tiemens, Gerben; ms4w-users@... Onderwerp: RE: [MS4W-Users] [ms4w-users] agg + transparency + quantize not working 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@... [mailto:ms4w-users-bounces@...] Namens G. Tiemens Verzonden: Thursday, November 05, 2009 1:46 PM Aan: ms4w-users@... 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@... http://lists.maptools.org/mailman/listinfo/ms4w-users << Please read our E-mail Disclaimer at: Emaildisclaimer.Grontmij.com >> _______________________________________________ MS4W-Users mailing list MS4W-Users@... http://lists.maptools.org/mailman/listinfo/ms4w-users |
|
|
Re: [ms4w-users] agg + transparency + quantize not workingG. Tiemens wrote:
> 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? > Hello, MS4W 3.0 is compiled with the '-DUSE_RGBA_PNG' option, which enables support for quantization of RGBA PNGs. Does that answer your question properly? -jeff -- Jeff McKenna FOSS4G Consulting and Training Services http://www.gatewaygeomatics.com/ _______________________________________________ MS4W-Users mailing list MS4W-Users@... http://lists.maptools.org/mailman/listinfo/ms4w-users |
|
|
Re: [ms4w-users] agg + transparency + quantize not workingThanks,
I already found out. The mapfile with quantization options and transparency and agg renderer works if i put it in the cgi (mapserv.exe). But if I use the mapscript on the same mapfile: mapobj.draw() The resulting image is not good. Greetings Gerben ________________________________________ Van: ms4w-users-bounces@... [ms4w-users-bounces@...] namens Jeff McKenna [jmckenna@...] Verzonden: donderdag 5 november 2009 20:01 Aan: ms4w-users@... Onderwerp: Re: [MS4W-Users] [ms4w-users] agg + transparency + quantize not working G. Tiemens wrote: > 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? > Hello, MS4W 3.0 is compiled with the '-DUSE_RGBA_PNG' option, which enables support for quantization of RGBA PNGs. Does that answer your question properly? -jeff -- Jeff McKenna FOSS4G Consulting and Training Services http://www.gatewaygeomatics.com/ _______________________________________________ MS4W-Users mailing list MS4W-Users@... http://lists.maptools.org/mailman/listinfo/ms4w-users << Please read our E-mail Disclaimer at: Emaildisclaimer.Grontmij.com >> _______________________________________________ MS4W-Users mailing list MS4W-Users@... http://lists.maptools.org/mailman/listinfo/ms4w-users |
| Free embeddable forum powered by Nabble | Forum Help |