[mapserver-users] ECW Image Quality

Frank Warmerdam warmerdam at pobox.com
Tue Jan 22 12:09:14 EST 2002


On Tue, Jan 22, 2002 at 10:00:39AM -0700, Richard Greenwood wrote:
> Frank,
> 
> I started with a 24 bit tiff and made the ecw. I tried various options with 
> the ecw compressor, but none of them made any noticeable difference.
> 
> Here's the gdalinfo for the 24 bit tiff:
> 
>    Driver: GTiff/GeoTIFF
>    Size is 6000, 5000
>    Coordinate System is `'
>    Origin = (2417000.000000,1420500.000000)
>    Pixel Size = (1.000000,-1.000000)
>    Metadata:
>      TIFFTAG_SOFTWARE=Horizons TIFF Library (c) 1994  3.73 - (GEO-JPEG) 
> 21-Apr-99  rlb
>    Corner Coordinates:
>    Upper Left  ( 2417000.000, 1420500.000)
>    Lower Left  ( 2417000.000, 1415500.000)
>    Upper Right ( 2423000.000, 1420500.000)
>    Lower Right ( 2423000.000, 1415500.000)
>    Center      ( 2420000.000, 1418000.000)
>    Band 1 Block=6000x1 Type=Byte, ColorInterp=Red
>      Min=0.000/0, Max=255.000/0
>    Band 2 Block=6000x1 Type=Byte, ColorInterp=Green
>      Min=0.000/0, Max=255.000/0
>    Band 3 Block=6000x1 Type=Byte, ColorInterp=Blue
>      Min=0.000/0, Max=255.000/0
> 
> The fact that my photogrammetrist supplied a 24 bit tiff doesn't mean that 
> it might have been a 8 bit image at some point in its processing. I've used 
> photoshop to convert the 24 bit tiffs into 8 bit indexed color tiffs and I 
> can't say I really see any difference. (The indexed color tiffs are what 
> I'm serving via mapserver, and they look really good)  I also tried making 
> the ecw from the indexed color tiff, but it didn't look much better. Would 
> a gdalinfo of the indexed color tiff be useful?

Rich, 

I think the central problem is the lack of error diffusion in the MapServer
24 to 8 bit conversion code along with the poor choice of paletted (because
we want it to be fixed).  

I have code for doing Floyd-Steinberg dithering (error diffusion) but I am
not sure it would be suitable to include in MapServer because of the extra
time overhead.  I suppose it couldn't hurt too much and without it (and
without 24bit support) mapping from color ECW is pretty pointless.  

I will add error diffusion in MapServer to my TODO list, but no promises as
to when it will get done. 

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