#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)
Change History (9)
by , 15 years ago
| Attachment: | black-background.png added |
|---|
comment:1 by , 15 years ago
comment:2 by , 15 years ago
| Cc: | added; removed |
|---|
comment:3 by , 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 , 15 years ago
| Cc: | added |
|---|---|
| Milestone: | → 6.0 release |
| Owner: | changed from to |
Alan, can you please see if you could figure out and fix this one?
comment:5 by , 15 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
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 , 15 years ago
A note have been added in documentation: http://mapserver.org/mapfile/outputformat.html (see FORMATOPTION, PALETTE section)
comment:7 by , 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.

A screenshot of the black background