> > thanks for the reply, I did try with NBITS=8 and 12 with osgeo4w's gdal > and tamas' nightly build but the output results are incorrect > > Here is a sample file (93Mo) : > http://dl.free.fr/iFT4hH3Yj > > I'll try to rebuild gdal on my linux box with the internal libs
I haven't looked at your result image, but you cannot just specify NBITS=8 or 12, if the range of the values in the original file is full 16 bits. You need to rescale the values, otherwise they will get clamped to [0, 255] or [0, 4096]. So you can look for the min/max reported by gdalinfo -mm uncompressed_original.tif and then try : gdal_translate -co "COMPRESS=JPEG" uncompressed_original.tif compressed.tif -scale min max 0 255 -ot Byte or gdal_translate -co "COMPRESS=JPEG" uncompressed_original.tif compressed.tif -scale min max 0 4095 -co NBITS=12 _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
