Hi!

The AGG renderer it self can not produce 8bit output, but as stated in the
RFC GD is actually used to handle the images. The quantize method for
reducing color depth from 24bits to 8bits works quite well with the AGG
renderer, but not if the WMS parameter TRANSPARENT is set to true. I guess
this has something to do withe the fact that GD interprets the alpha channel
backwards, hence the resulting image is in some way "broken". But for some
reason, I don't know why, this is not the case when 24bit images is
delivered the transparency works perfectly well.

Regards
Pål Kristensen



Travis Kirstine wrote:
> 
> Sorry Pal I  have no advice just a comment.  We were considering
> upgrading to ms 5.0 with agg but never did do to the statment on the
> mapserver site "The AGG driver only supports RGB output at this time."
> on the Support for Anti-Grain Geometry (AGG) Rendering Engine
> documents.
> 
> http://mapserver.gis.umn.edu/development/rfc/ms-rfc-32
> 
> I guess this in not correct?
> 
> Travis
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On 17/12/2007, Pål Kristensen <[EMAIL PROTECTED]> wrote:
>> Hi!
>>
>> I'm trying to use the AGG renderer and reduce the resulting 24bits image
>> to
>> 8bits by using the quantize method. This works quite well when the WMS
>> parameter TRANSPARENT=false, but when set to true the BGCOLOR parameter
>> seems to be ignored and the quality of the rendered vectors clearly
>> degrades.
>>
>> When requesting 24bit images the TRANSPARENT parameter works correctly.
>> See
>> the examples below:
>>
>> 24bit png, transparent true -> OK:
>> http://159.162.103.7/cgi-bin/NorgeTopo?VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&SRS=EPSG:32633&BBOX=62423.20,6794915.15,66383.94,6797147.88&LAYERS=Hoydekurver&STYLES=&WIDTH=926&HEIGHT=522&FORMAT=image/png;%20mode=24bit&BGCOLOR=0xffffff&TRANSPARENT=true
>>
>> 24bit png, transparent false -> OK:
>> http://159.162.103.7/cgi-bin/NorgeTopo?VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&SRS=EPSG:32633&BBOX=62423.20,6794915.15,66383.94,6797147.88&LAYERS=Hoydekurver&STYLES=&WIDTH=926&HEIGHT=522&FORMAT=image/png;%20mode=24bit&BGCOLOR=0xffffff&TRANSPARENT=false
>>
>> 8bit png, transparent false -> OK:
>> http://159.162.103.7/cgi-bin/NorgeTopo?VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&SRS=EPSG:32633&BBOX=62423.20,6794915.15,66383.94,6797147.88&LAYERS=Hoydekurver&STYLES=&WIDTH=926&HEIGHT=522&FORMAT=image/png&BGCOLOR=0xffffff&TRANSPARENT=false
>>
>> 8bit png, transparent true -> NOT OK:
>> http://159.162.103.7/cgi-bin/NorgeTopo?VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&SRS=EPSG:32633&BBOX=62423.20,6794915.15,66383.94,6797147.88&LAYERS=Hoydekurver&STYLES=&WIDTH=926&HEIGHT=522&FORMAT=image/png&BGCOLOR=0xffffff&TRANSPARENT=true
>>
>> This is the output formats from the mapfile:
>> ...
>>   OUTPUTFORMAT
>>      NAME "png8bit"
>>      DRIVER "AGG/PNG"
>>      MIMETYPE "image/png"
>>      EXTENSION "png"
>>      FORMATOPTION "QUANTIZE_FORCE=ON"
>>      FORMATOPTION "QUANTIZE_COLORS=256"
>>      FORMATOPTION INTERLACE=OFF
>>   END
>>
>>   OUTPUTFORMAT
>>      NAME "png24bit"
>>      DRIVER "AGG/PNG"
>>      MIMETYPE "image/png; mode=24bit"
>>      EXTENSION "png"
>>      IMAGEMODE "RGB"
>>      FORMATOPTION INTERLACE=OFF
>>   END
>>
>>   OUTPUTFORMAT
>>      NAME "jpeg24"
>>      DRIVER "AGG/JPEG"
>>      MIMETYPE "image/jpeg"
>>      EXTENSION "jpg"
>>      FORMATOPTION "QUALITY=60"
>>   END
>> ...
>>
>> Regards,
>> Pål Kristensen
>> --
>> View this message in context:
>> http://www.nabble.com/AGG-renderer-in-conjunction-with-WMS-TRANSPARENT%3Dtrue-parameter-tp14370293p14370293.html
>> Sent from the Mapserver - User mailing list archive at Nabble.com.
>>
> 
> 
> -- 
> Travis K.
> 
> Toronto, Canada
> ------------------------------------------------------------
> "She knows there's no success like failure
> And that failure's no success at all."
> -Bob Dylan-
> ------------------------------------------------------------
> 
> 

-- 
View this message in context: 
http://www.nabble.com/AGG-renderer-in-conjunction-with-WMS-TRANSPARENT%3Dtrue-parameter-tp14370293p14412307.html
Sent from the Mapserver - User mailing list archive at Nabble.com.

Reply via email to