Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#3217 closed defect (wontfix)

AGG outputformat with palette, black transparency

Reported by: adube Owned by: aboudreault
Priority: normal Milestone: 6.0 release
Component: MapServer C Library Version: 5.4
Severity: normal Keywords: palette, agg, outputformat, png, transparent
Cc: aboudreault, sdlime, dmorissette

Description

When using the AGG/PNG driver with a palette and transparency turned on, instead of a transparent image I get a black background.

I already had this problem in the past but had no need for transparency so a simple workaround worked for me : a "dummy" layer containing a polygon that filled the whole map to cover the black background. But now, I need the image to be transparent to be able to use in OpenLayers, so the workaround won't do (since the outputted image with background never seems to be transparent).

I'll post a test case showing the problem very soon.

Attachments (2)

black-background.png (7.1 KB ) - added by adube 15 years ago.
A screenshot of the black background
3217.tar.gz (120.3 KB ) - added by adube 15 years ago.
Test case data tarball

Download all attachments as: .zip

Change History (9)

by adube, 15 years ago

Attachment: black-background.png added

A screenshot of the black background

comment:1 by adube, 15 years ago

Here's live demos showing the problem. The data is also attached. Simply copy the url options to reproduce the problem locally. No tests made with MapServer 5.6.0 yet.


MapServer 5.2.1 :

no palette

with palette (bug)

with palette and dummy layer


MapServer 5.4.2 :

no palette

with palette (bug)

with palette and dummy layer

by adube, 15 years ago

Attachment: 3217.tar.gz added

Test case data tarball

comment:2 by aboudreault, 15 years ago

Cc: aboudreault added; adube@… removed

comment:3 by adube, 15 years ago

I made the same tests locally with MapServer 5.6.0, with and without --with-experimental-png and I had the same result (black background)

comment:4 by dmorissette, 15 years ago

Cc: sdlime dmorissette added
Milestone: 6.0 release
Owner: changed from sdlime to aboudreault

Alan, can you please see if you could figure out and fix this one?

comment:5 by aboudreault, 15 years ago

Resolution: wontfix
Status: newclosed

It seems that to make the transparency work, we have to add these two lines in the palette file:

0,0,0,0
255,255,255,255

and not only 255,255,255,255. I'll add a note about that in the outputformat documentation page.

comment:6 by aboudreault, 15 years ago

A note have been added in documentation: http://mapserver.org/mapfile/outputformat.html (see FORMATOPTION, PALETTE section)

comment:7 by adube, 15 years ago

I confirm that adding the above two lines in the palette file and using --with-experimental-png, the problem's gone.

Thanks a lot.

Note: See TracTickets for help on using tickets.