Opened 11 years ago

Closed 11 years ago

#4400 closed defect (fixed)

The ECW driver can not create files with compression ratio higher than 100

Reported by: jcrepetto Owned by: warmerdam
Priority: normal Milestone: 1.9.0
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: ECW


For example, if I want a target compression ratio of 200, I need to set the TARGET creation output parameter to 99.5 :

gdal_translate -of ECW -co TARGET=99.5 ign.jpg ign.ecw
Input file size is 662, 360
0ERROR 6: TARGET compression of 99.500 invalid, should be a
value between 0 and 99 percent.

The attached patch solves the problem.

Attachments (1)

gdal_ecw_target.patch (838 bytes ) - added by jcrepetto 11 years ago.
ECW target patch

Download all attachments as: .zip

Change History (2)

by jcrepetto, 11 years ago

Attachment: gdal_ecw_target.patch added

ECW target patch

comment:1 by Even Rouault, 11 years ago

Resolution: fixed
Status: newclosed

I'm wondering how usefull it will be. At such compression rates, you will never recover something close to the full resolution. You'd better just generate a reduced size image with better quality, otherwise pretending that you have a W * H image is a bit lying when the information it contains is not better than an image of size (W/100) * (H/100) with a normal compression rate.

Anyway... I've applied a variation of your patch :

r23601 /trunk/gdal/frmts/ecw/ecwcreatecopy.cpp: ECW: use a scientific approach to compute the maximum allowed value for the TARGET compression option (rounded to 99.99 %) (#4400)

Note: See TracTickets for help on using tickets.