Opened 15 years ago

Last modified 15 years ago

#3201 closed defect

GetBytes(), Write() on ImageObj results in error when parsing mapfile with AGG renderer in C# mapscript. — at Version 1

Reported by: getiem Owned by: tamas
Priority: normal Milestone: 5.6.1 release
Component: MapScript Version: svn-trunk (development)
Severity: normal Keywords:
Cc: dmorissette

Description (last modified by dmorissette)

GetBytes(), Write() on ImageObj results in error when parsing mapfile with AGG renderer specified.

Tested on mapserver-mapscript C# on windows through MS4W:

Options:

  1. MS4W 2.29 --> Mapserver 5.2
  2. MS4W 3.0 beta 7 --> Mapserver 5.4.2
  3. MS4W 5.6 beta 5 --> Mapserver 5.6 beta 5

Short description:

When using AGG renderer in the mapObj (mapfile) the code will return the following when using the function getBytes(), or Write() on the ImageObj.

With versions there are differences:

1) and 2) return an image. The image looks good, but when using OptiPNG or other programs, the internals of the PNG are crippled. This becomes visible within mapserver when using AGG + Quantization options on. The image is not usefull.(transparency is lost, blacks will become transparent all the time, labels lost).

3) returns an error, no matter the quantization or not: base {"getBytes: General error message. Failed to get image buffer;msSaveImageBufferGD(): Image handling error. Unknown output image type driver: gd/."} System.Exception {System.ApplicationException}

Above 3) shows where the error resides.

Further testing:

ImageObj.Save(image.png) returns the image as should in all cases. Normal image, good transparency. Also with the quantization options on.

Change History (1)

comment:1 by dmorissette, 15 years ago

Cc: dmorissette added
Description: modified (diff)

Tamas, Any idea? Is this a 5.6 blocker?

Gerben, could you provide a test case to reproduce this? (i.e. simple mapfile, data and script)

Note: See TracTickets for help on using tickets.