[Gdal-dev] From GeoTIFF to JPEG2000

Frank Warmerdam warmerdam at pobox.com
Tue May 8 10:31:31 EDT 2007


Mario Cavicchi wrote:
> Hi to all,  
> This is a first time that i post to this ml. My name is Mario Cavicchi  
> and i'm italian.    
> I have a problem with a little c program that i wrote. My program  
> convert from GeoTIFF to JPEG2000 (with jaster) and it work correctly 
> with file of size about 60/70 Mbyte, but when i try to convert a big 
> file (260Mbyte more or less) i receive this error:
> 
> fcv: jpc_t1enc.c:215: jpc_enc_enccblk: Assertion `cblk->stream' failed.
> 
> Someone can help me? 

Mario,

I *suspect* this is due to running out of memory.  The JasPer library tends
to be very memory hungry and in proportion to the size of the image being
compressed or decompressed.  I think you will have to either stick to smaller
images, get more RAM or consider using a different JPEG2000 encoder that is
less memory hungry.

The JP2KAK and JP2ECW drivers in GDAL (depending on the proprietary
Kakadu library and the open source ECW SDK respectively) should have much
better memory performance.  They are both built into the FWTools binaries
if you want to try them out.

   http://fwtools.maptools.org/

Of course, I could be wrong and the issue could be something else.

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 Gdal-dev mailing list