Ticket #3217 (closed defect: wontfix)

Opened 4 years ago

Last modified 4 years ago

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

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

Change History

Changed 4 years ago by adube

A screenshot of the black background

Changed 4 years ago by adube

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

Changed 4 years ago by adube

Test case data tarball

Changed 4 years ago by aboudreault

  • cc aboudreault added; adube@… removed

Changed 4 years ago by adube

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)

Changed 4 years ago by dmorissette

  • cc sdlime, dmorissette added
  • owner changed from sdlime to aboudreault
  • milestone set to 6.0 release

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

Changed 4 years ago by aboudreault

  • status changed from new to closed
  • resolution set to wontfix

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.

Changed 4 years ago by aboudreault

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

Changed 4 years ago by adube

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.