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

Even Rouault even.rouault at mines-paris.org
Thu Jul 28 18:05:22 EDT 2011


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