Opened 17 years ago

Last modified 17 years ago

#767 closed enhancement (fixed)

Create ECW from source files larger than 500 MB

Reported by: armin.burger@… Owned by: warmerdam
Priority: high Milestone:
Component: GDAL_Raster Version: unspecified
Severity: minor Keywords:


Would be interesting to have the ECW/JP2000 compression available for files
larger than 500 MB, based on the GPL-style license of the ECW SDK 3.1

Change History (3)

comment:1 by warmerdam, 17 years ago


I did do a quick test with the new source toolkit and it does still 
enforce the 500MB input limit.  I will need to review the code to see how
to turn this check off.  I would also like to discuss this with ERMapper to 
make sure if I release binaries based on this that I am not treading on any

Best regards,

comment:2 by warmerdam, 17 years ago


 I inserted the CNCSFile::SetKeySize()  call into the Initialize function
in ecwcreatecopy.cpp (around line 748):

/* -------------------------------------------------------------------- */
/*      Set the file info.                                              */
/* -------------------------------------------------------------------- */
   CNCSError oError;

   oError = SetFileInfo( sFileInfo );

   if( oError.GetErrorNumber() == NCS_SUCCESS )
       CNCSFile::SetKeySize() ;  //Disable 5000gb limit

       if( fpVSIL == NULL )
           oError = Open( (char *) pszFilename, false, true );
           oError = CNCSJP2FileView::Open( &(m_OStream) );

And gdal_translate worked fine (it produced a full resolution ecw file from
a 700 mb tiff).

I'm not sure if this is the only place the call should be inserted; and it
should likely be wrapped in a #define ECW_ENABLE_UNLIMITED_COMPRESSION (or
something similar) to give the application builder control over which
license to adhere to.

Brent Fraser

comment:3 by warmerdam, 17 years ago


I have committed a change (a few weeks ago now) to allow large ECW
files if the configuration option ECW_LARGE_OK is set to YES.  This
can be accoplished as an environment variable or like:

 gdal_translate --config ECW_LARGE_OK YES -of ECW in.tif out.ecw

Best regards,
Note: See TracTickets for help on using tickets.