[Mapserver-users] colored tiff forced to greyscale

Frank Warmerdam warmerdam at pobox.com
Tue Jun 15 12:44:01 EDT 2004


pierre.giraud3 at free.fr wrote:
>  hello list,
> 
> Didn't find any post answering my problem, probably didn't choose the suitable 
> keywords.
> 
> Is there any way to force mapserver to draw a 8-bit (or 24-bits) raster layer 
> in greyscale ?

Pierre,

In fact, no there is no way of declaring a request in the mapfile that
a given raster should ignore it's color table.  When I run into this I
normally reprocess the file to have no color table.  This could be
accomplished by converting to a color-table free format such as PAux (raw)
format.

eg.

gdal_translate -of PAux myfile.tif myfile_grey.raw
gdal_translate -of GTiff myfile_grey.raw myfile_grey.tif

rm -f myfile_grey.raw myfile_grey.aux

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the mapserver-users mailing list