RGB vs grayscale

Frank Warmerdam warmerdam at POBOX.COM
Fri Apr 27 15:09:48 EDT 2007


John Mitchell wrote:
> Hi,
> 
> Below are sections from 2 different gdalinfo listings:
> 
> RGB that displays the way we expected in MapServer
> 
> Band 1 Block=256x256 Type=Byte, ColorInterp=Red
> Band 2 Block=256x256 Type=Byte, ColorInterp=Green
> Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
> ----------------------
> RGB that displays as a gray scale in MapServer
> 
> Band 1 Block=1394x1 Type=Byte, ColorInterp=Red
> Band 2 Block=1394x1 Type=Byte, ColorInterp=Green
> Band 3 Block=1394x1 Type=Byte, ColorInterp=Blue
> 
> What does 1394x1 mean (one level deep)?

John,

1394x1 is the internal blocksize in the file.  It basically means that
the file in question is being accessed scanline by scanline, while the
other is read in chunks of 256x256 tiles.

> The second image that shows up as gray scale within MapServer shows up 
> as color within the global mapper desktop application.  Is their 
> anything that could be done to change the header info within the file ( 
> i.e. running gdalwarp against the grayscale appearing image so that 
> MapServer recognizes it as RGB)?

There is no reason obvious from the gdalinfo output that mapserver would
have trouble showing the second image in RGB.

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    | President OSGeo, http://osgeo.org



More information about the mapserver-users mailing list