[Mapserver-users] GeoTiff output color problems

Frank Warmerdam warmerdam at pobox.com
Wed Jun 2 17:47:10 EDT 2004


Matthew Perry wrote:
> Hello folks,
>  
> Testing a new intallation of mapserver here and I'm getting some wierd 
> results when outputting Geotiffs:
>  
> When I use the following:
>  
> OUTPUTFORMAT 
>   NAME GTiff
>   DRIVER "GDAL/GTiff"
>   MIMETYPE "image/tiff"
>   IMAGEMODE PC256           
>   EXTENSION "tif"
> END
>  
> I get this image: http://ktrin.cnrs.humboldt.edu/misc/gtiff_256.tif
>  
> This has the correct colors but poor quality, plus I would like to have 
> 24 bit output. So I tried the following:

Matthew,

I'm not sure how you generated this.  It should have the same colors
that you would find if you did png output.

> OUTPUTFORMAT 
>   NAME GTiff
>   DRIVER "GDAL/GTiff"
>   MIMETYPE "image/tiff"
>   IMAGEMODE RGB           
>   EXTENSION "tif"
> END
>  
> which gives me this image with bizzare colors (but better resolution): 
> http://ktrin.cnrs.humboldt.edu/misc/gtiff_rgb.tif
>  
> Both images are properly georeferenced, though. I have tried reversing 
> the order of the bands (in ArcMap 8.3) to no avail.
>  
> Any ideas why the Geotiff 24bit color would be innacurate?

It looks like a color band mixup of some sort.  The blue band seems to really
be alpha values.  Try IMAGEMODE RGBA and see if the result is any better.
I would appreciate your submitting a bugzilla report about the RGB output if
you can boil it down to something easy to reproduce with MapServer 4.2.

PS. please assign the bug report directly to me.

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