[Gdal-dev] gdalwarp color management

Frank Warmerdam warmerdam at pobox.com
Thu Mar 1 11:03:31 EST 2007

ivan marchesini wrote:
> Dear users..
> I'm reprojecting with gdalwarp a tif raster image of 2.4 MB and with a
> RGB color table with only two entries: 0,0,0,255 and 255,255,255,255
> (gdalinfo output)
> after the reprojection I obtain a 220 MB image with RGB color table and
> 256 entries...
> the image is too much large...
> how can I solve this problem???


It would appear your input file is really a 1bit file, and likely is
compressed.  You can try adding "-co COMPRESS=DEFLATE" to your gdalwarp
commandline to compress your output file.  It should compress very well.

If that fails in some weird way, then use gdalwarp normally, and then
do the compression as an extra step.

gdal_translate -co COMPRESS=DEFLATE in.tif out.tif

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