Color distortion still

Frank Warmerdam fwarmerdam at GMAIL.COM
Mon Jan 3 09:07:43 EST 2005


On Mon, 3 Jan 2005 09:01:44 -0500, Abe Gillespie <agillesp at vt.edu> wrote:
> I'm using the latest version but am still getting color changing
> problems.  Now, however, it only happens when I have a layer with
> transparency.  You can see the problems here:
>
> layer w/o transparency:
> http://141.152.79.120/temp/color.png
>
> layer w/ transparency:
> http://141.152.79.120/temp/grey.png
>
> The layer with the transparency I change is the one that goes from a
> pinkish color to grey.

Abe,

I have reviewed the gdImageCopyMerge() used by mapserver
to apply transparent layers to the master copy, and the problem
seems to be there.  It appears it deliberately uses only a greyscale
value from the layer being overlaid on the master, presumably to
moderate the number of colors used.

Generally speaking I would advise against using transparent
layers in 8bit mode anyways due to the difficult to predict number
of colors that will be needed.

The gdImageCopyMerge() function is a part of the GD library and
so not under out (the mapserver developers) direct control.
However, if you want to file a bug on the problem we could try
and incorporate a special case in our higher level logic to handle
transparency with 8bit (pseudocolored) images.  If you file a bug on
this issue please include this email so we don't have to re-discover
what is going on.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list