Ticket #463 (closed defect: fixed)

Opened 10 years ago

Last modified 10 years ago

imageobj pasteimage transparency no longer works

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

Description

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

Changed 10 years ago by dmorissette

  • cc mapserver-bugs@… added
  • owner changed from mapserverbugs to morissette@…
Looking into this now.  Reassigned to myself.

Changed 10 years ago by dmorissette

  • status changed from new to closed
  • resolution set to fixed
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.