Ticket #4400 (closed defect: fixed)

Opened 17 months ago

Last modified 17 months ago

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
Cc:

Description

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

gdal_ecw_target.patch Download (0.8 KB) - added by jcrepetto 17 months ago.
ECW target patch

Change History

Changed 17 months ago by jcrepetto

ECW target patch

Changed 17 months ago by rouault

  • status changed from new to closed
  • resolution set to fixed

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.