Opened 17 years ago

Closed 15 years ago

#1984 closed defect (fixed)

PHP Mapscript, imageformat settings being ignored

Reported by: support@… Owned by: dmorissette
Priority: normal Milestone:
Component: MapScript-PHP Version: 4.10
Severity: normal Keywords:
Cc:

Description

I want to output transparent PNG24 images, since that seems to be the only
image format that supports transparency without mangling colors. PHP
Mapscript seems to be ignoring my attempts to set the image format
options, so I always get non-transparent images.

My code snippet:
      $map = ms_newMapObj(NULL);
      $map->selectOutputFormat('png24');
      $map->outputformat->set('imagemode',MS_IMAGEMODE_RGBA);
      $map->outputformat->set('transparent',MS_ON);

Generate mapfile snippet:
  OUTPUTFORMAT
    NAME "png24"
    MIMETYPE "image/png; mode=24bit"
    DRIVER "GD/PNG"
    EXTENSION "png"
    IMAGEMODE "RGB"
    TRANSPARENT FALSE
  END


Daniel Morissette writes:
I made a few tests and checked the php_mapscript.c code and I think the 
implementation of selectOutputFormat() fails to update the reference to 
the current outputFormatObj inside the PHP wrapper object.

Change History (1)

comment:1 by guest, 15 years ago

Resolution: fixed
Status: newclosed

This was duplicated as bug 2623 by assefa, and is reported as having been corrected in 5.2 Yay for earth!

Note: See TracTickets for help on using tickets.