[mapserver-users] Raster layers with partial transparency

Jason Beverage jasonbeverage at gmail.com
Wed Sep 16 16:57:40 PDT 2009


Hey Chris,

Thanks for the guess, setting transparent to 0 doesn't get rid of the issue,
just makes the background default to white with full opacity.

I found the issue, I was setting PROCESSING=BILINEAR which apparently
doesn't work well with partially transparent pixels.  Going back to nearest
seems to work fine.

Thanks!

Jason

On Wed, Sep 16, 2009 at 7:20 PM, Chris Hodgson <chodgson at refractions.net>wrote:

> Just a guess but have you tried with transparent = 0? Just wondering if the
> transparent mode rendering is somehow overriding the RGBA alpha mode
> rendering?
>
> Chris
>
> Jason Beverage wrote:
>
>> Hi all,
>>
>> I'm serving up some raster imagery with an alpha band that contains
>> partially transparent pixels using mapscript but when the image is rendered,
>> the partially transparent portions (alpha between 5 and 10) come through
>> completely opaque (alpha of 255).  Areas that are fully opaque or fully
>> transparent look fine.
>> I'm using an output format with the GD/PNG renderer with a RGBA image mode
>> and "transparent" set to true.  I've tried using the AGG/PNG and GDAL/PNG
>> renderers with the same result.
>>
>> C# code for the output format:
>> map.outputformat.name <http://map.outputformat.name> = "PNG";
>> map.outputformat.driver = "GD/PNG";
>> map.outputformat.mimetype = "image/png";
>> map.outputformat.imagemode = (int)MS_IMAGEMODE.MS_IMAGEMODE_RGBA;
>> map.outputformat.extension = "png";
>> map.outputformat.transparent = 1;
>>
>> Any ideas on what I'm doing wrong?
>>
>> Thanks,
>>
>> Jason
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090916/8ff1cb8a/attachment.htm>


More information about the MapServer-users mailing list