[gdal-dev] 1-bit TIFF Images
even.rouault at mines-paris.org
Fri Dec 19 15:26:14 EST 2008
The TIFF driver also supports writing 1-bit TIFF images. See NBITS in the
Creation Options section.
For example: gdal_translate source.tif output_1bit.tif -co NBITS=1
When reading a 1-bit TIFF image, GDAL will expand each bit as a byte.
When writting a 1-bit TIFF image, GDAL will write 1 as the bit value if the
pixel value is non-zero, or 0 as the bit value if the pixel value is zero.
Le Friday 19 December 2008 21:16:53 Matt Klaric, vous avez écrit :
> Does anyone have any experience using 1-bit TIFF images with GDAL? The
> GeoTIFF file format page (http://www.gdal.org/frmt_gtiff.html) indicates
> that they can be read, but is silent on the issue of writing them. I'm
> interested in writing them using GDAL, but it appears that the 1-bit data
> type is not valid in GDAL(
> http://gdal.org/gdal_8h.html#22e22ce0a55036a96f652765793fb7a4). Does
> anyone have any experience with this? How difficult would it be to modify
> the TIFF driver to handle these?
> Matt Klaric
More information about the gdal-dev