[gdal-dev] gdal_tranlate 50% downsample doubling my file size

JK Chen jk.chen at sdl.usu.edu
Thu Jul 28 19:21:37 EDT 2011


Even,

Thanks for your reply. That all makes senses to me know. Indeed it's VQ. :-)

JK

-----Original Message-----
From: Even Rouault [mailto:even.rouault at mines-paris.org] 
Sent: Thursday, July 28, 2011 4:05 PM
To: gdal-dev at lists.osgeo.org
Cc: JK Chen
Subject: Re: [gdal-dev] gdal_tranlate 50% downsample doubling my file size

Le jeudi 28 juillet 2011 23:33:57, JK Chen a écrit :
> Hi,
> 
> I used gdal-translate command to downsample a nitf  file,  but the 
> size of generated file almost doubles. Is there something that I did 
> wrong? I can't use this new file because bigger size is not 
> acceptable, even though its display looks correct.
> 
> Here is the command I used:
> 
> C:\Map\RPF\CIB\I2\2\tmp>gdal_translate -of NITF -outsize 50% 50%
> 00ev2n1a.i22  half 289,827               00EV2N1A.I22
> 591,383               half

It is not surprising. Your .I22 file is likely a CIB NITF, which uses a                                                                                                                                                                                                                                                                           
VQ compression scheme (quite efficient admitedly). But when doing gdal_translate -of NITF, you produce an uncompressed file, so it's not surprising that it will be larger than the original one. But GDAL cannot write VQ compressed files. So you could consider other compressions schemes of the NITF format (JPEG,
JPEG2000 --> see http://gdal.org/frmt_nitf.html ) or other formats.

> 
> Thanks.
> 
> JK


More information about the gdal-dev mailing list