forced palette for RGBA images

Steve Lime Steve.Lime at DNR.STATE.MN.US
Thu Dec 6 12:07:55 EST 2007

Sounds cool. Any configuration issues related to libpng?


>>> On 12/6/2007 at 10:07 AM, in message
<d2b988930712060807n281f8850t386bd85182bd1a22 at>, thomas bonfort
<thomas.bonfort at GMAIL.COM> wrote:
> hello list,
> I've added the possiblity to force a color palette for RGBA images. As
> gd does not support this kind of images, I had to resort to directly
> use libpng functions for the actual saving of the file.
> The steps needed to actually use this would be:
> - create a 24 bit rgba image representative of a typical image that
> would be produced
> - use an external program to create an rgba paletted version of the
> image (pngquant, pngnq, photoshop...)
> - extract the palette from the created image and save the values in
> the form r,g,b,a in a text file (one per line)
> - use palette_force and palette formatoptions in the outputformat block.
> This is rather complicated, but usefull on production setups to
> minimize image size when using clients that overlay layers (eg
> openlayers).
> There are still a few quirks I'd have to work on before the code is
> robust enough for inclusion in the trunk, so I'd like to know if this
> is a feature we'd definitely like to have before putting too much
> effort into that.
> cheers,
> thomas

More information about the mapserver-dev mailing list