[mapserver-users] a question about tiffimages

Stephen Lime steve.lime at dnr.state.mn.us
Fri May 18 11:52:09 EDT 2001


MapServer allocates a baisc palette based on the mapfile when it is parsed. Then
images get access to whatever is left over and finally font anti-aliasing get any
leftover space. Chris is right, decreasing the number of colors in the TIFF may
help.

On the 24-bit side, a new version of GD is out. It will be integrated after the initial
3.5 release. It's unclear how useful it will be though. It definitely reads (writes?) 
truecolor but it's gotta be slower so integration may be tricky especially when
preserving GIF support.

Note: there may be functionality in the new 3.5 GDAL support that replaces
current TIFF support if compiled in. In know there's projection and resampling
code in place but don't know if there's any color quantization code as well. Probably
doesn't matter since there's still only 8-bit output.

Steve

Stephen Lime
Internet Applications Analyst

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> Chris Stuber <imap at chesapeake.net> 05/18/01 03:49AM >>>

Paul J,

The output is 8-bit, and I guess you are allocating some other colors in your
mapfile... which in effect over-allocates the color table.  Since mapserver's
limitation (last time I checked) is 8-bit output,  I'd suggest that you decrease
the number of colors used in your TIFF image so that you have colors for
lines/polys/symbols, etc.

Although PNG supports 24-bit, mapserver only deals with with an 8-bit color
table....  Steve, correct?  Any new developments along these lines?  I have the
same problems with my raster images/charts/topos, etc.  It would be nice to
somehow handle image resampling or some other magic to avoid this problem.

Regards,

Chris Stuber (mapsurfer)

Paul Jacobs wrote:
> 
> Hi,
> I have a question about tiff images and perl mapscript. When the
> tiff-pictures are rendered (256 color) sometimes the colors of the tiff
> images are changed into very different colors than the original. Does anyone
> know why this happens?
> 
> regards,
> Paul Jacobs




More information about the mapserver-users mailing list