Opened 19 years ago

Closed 19 years ago

#1250 closed defect (fixed)

legend icons and transparency alpha for pixmap

Reported by: pierre.giraud@… Owned by: sgillies@…
Priority: high Milestone: 4.6 release
Component: MapServer C Library Version: unspecified
Severity: normal Keywords:
Cc:

Description

Somes recent fixed bugs relative to the use of pixmaps and RGBA
outputformat modes. I have to use "TRANSPARENCY ALPHA" in each layer
using pixmap symbol.
The map is rendered correctly.
But as far as I'm generating on the fly legend icons with the
createLegendIcon mapscript function some errors with transparency appear
on IExplorer.
First if TRANSPARENT is set to ON in the OUTPUTFORMAT (or in the MAP),
some grey color appear in alpha place.
In fact, IE does not support 32bits PNG. The solution should be given by
the ".htc" method but it is high client computing cost (file transfert
for each new page load).

What could be an alternative for my case is to take advantage of the
IMAGECOLOR in the LEGEND object and set the TRANSPARENT to OFF in
OUTPUTFORMAT ("transparent" in legend object is now deprecated). I
thought it acts like a background color . I would like the pixmap symbol
to be sticked on this background-color.

But it seems that the TRANSPARENCY ALPHA has no effect on the legend icons.

What would be appreciated is that in the usecase joined the legend icons appear
with the pixmap symbol on a red background.
Colors are volontary chosen flashy to identify possible problems.

Attachments (5)

tansparency_legend_icons.zip (385.4 KB ) - added by pierre.giraud@… 19 years ago.
complete testcase
IE- outputformat transparent OFF.gif (15.6 KB ) - added by pierre.giraud@… 19 years ago.
image to show the problem described in IE
4.gif (323 bytes ) - added by pierre.giraud@… 19 years ago.
pixmap symbol image
6.png (1.4 KB ) - added by pierre.giraud@… 19 years ago.
pixmap symbol image
maplegend.c (15.9 KB ) - added by sgillies@… 19 years ago.
maplegend.c for mapserver 4.4.2

Download all attachments as: .zip

Change History (11)

by pierre.giraud@…, 19 years ago

complete testcase

by pierre.giraud@…, 19 years ago

image to show the problem described in IE

comment:1 by sgillies@…, 19 years ago

Milestone: 4.6 release
Status: newassigned
Pierre, this is the best bug report ever!  thanks :)  I've set the target for
the 4.6 release (approx. June 2005) and if it is an easy fix, will fix it for
the 4.4.2 release as well.

comment:2 by sgillies@…, 19 years ago

I spoke too soon ... there are no pixmap symbols in the attachment.  Can you
attach 4.gif and 6.png?

by pierre.giraud@…, 19 years ago

Attachment: 4.gif added

pixmap symbol image

by pierre.giraud@…, 19 years ago

Attachment: 6.png added

pixmap symbol image

comment:3 by sgillies@…, 19 years ago

OK, I have committed a fix to the MapServer CVS HEAD.

I am attaching a maplegend.c file for MapServer 4.4.  Would you be 
willing to test it for me?  If it works, I'll commit it to the MapServer 4.4
branch.

by sgillies@…, 19 years ago

Attachment: maplegend.c added

maplegend.c for mapserver 4.4.2

comment:4 by sgillies@…, 19 years ago

It also just occurred to me that the easy solution for your particular problem
is to change your map's outputformat to a PCT PNG immediately before drawing
these particular legend icons.

comment:5 by pierre.giraud@…, 19 years ago

Sorry, I weren't able to test it quickly.
Even so, the bug seem to be fixed. I let you change its resolution.
Thanks for all.

comment:6 by sgillies@…, 19 years ago

Resolution: fixed
Status: assignedclosed
Thanks, Pierre.

Note: See TracTickets for help on using tickets.