Opened 16 years ago

Closed 16 years ago

#463 closed defect (fixed)

imageobj pasteimage transparency no longer works

Reported by: pspencer@… Owned by: dmorissette
Priority: high Milestone:
Component: MapScript-PHP Version: 4.0
Severity: minor Keywords:


As of 4.0, pasteImage no longer works with transparency because the second
parameter is the index of the color object to use as the 'transparent' color. 
With the switch to a 24bit color model internally, this function should be
updated to take either a colorobj or some color identifier (0xrrggbb?).

Change History (2)

comment:1 Changed 16 years ago by dmorissette

Cc: mapserver-bugs@… added
Owner: changed from mapserverbugs to morissette@…
Looking into this now.  Reassigned to myself.

comment:2 Changed 16 years ago by dmorissette

Resolution: fixed
Status: newclosed
Fixed in MapServer 4.1 (CVS).  Let me know if this is really needed in 4.0.x.

PasteImage() now takes a hex color value (e.g. 0xrrggbb) for the transparent
color instead of a color index.

Also note that the function works only with the source image in 8 bit image
formats (GIF/PNG) and won't work with PNG24 (I don't think the target image
format matters).  Anyway this function is a hack so I don't think it needs to
work with 24 bits PNG.
Note: See TracTickets for help on using tickets.