[FWTools] Compress Ecw like Ermapper free compressor

Frank Warmerdam warmerdam at pobox.com
Tue Jun 24 10:43:47 EDT 2008

toni-10 wrote:
> Hi!
> Is it any way to control the output of gdal_translate to Ecw in the same way
> offered by the ErMapper free compressor 7.0?
> In ErMapper compressor I can define:
> 1)Compression color to RGB
>   From help file I read: The compression engine internally
>   converts the RGB color image into YUV color space,
>   specifically the one defined as the "JPEG Digital version
>   of YUV". YUV is a color space that separates out intensity
>   (Y) from chromatic or color changes (U and V). This enables
>   more efficient compression of color imagery, ensuring that
>   detail is preserved. The RGB to YUV conversion is
>   automatic, and is automatically reversed during 
>   decompression; the user always sees the file as a RGB file.
> 2)Desired compression ratio: this is not the actual compression ratio (eg
> 1/10 = from 100mb to 10mb) but the target compression ratio, meaning "how
> much of the high frequencies info will be discarded"
> ---------
> In gdal_translate I have different controls such as
> "-co TARGET=percent" but this is not the same as "Desired compression ratio"
> meaning infact "the target size reduction as a percentage of the original".
> ...I don't know about RGB but the gdal_translate guide tells me that the ecw
> conversion "reads any number of bands but returns only as eight bit image
> data". Is it possibile, maybe with other utilities, to do what the ErMapper
> compressor does?


I believe the gdal_translate TARGET value is just converted into the
desired compression ratio internally.  The docs on it's interpretation may
be subtly inaccurate.

I'm not clear on what the "compression color to RGB" option actually does.
Does it turn greyscale or pseudocolored images into RGB images internally?

Or does it just avoid the internal conversion from RGB to YUV?

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 FWTools mailing list