[gdal-dev] Re: Saving 16 bit image

Even Rouault even.rouault at mines-paris.org
Thu Jul 21 10:26:24 EDT 2011


Selon el_inca <pavkiz at mail.ru>:

> I just mean..Is it necessary to do manipulations with scanline (byte array
> corresponding to 8 bit image) to save it  with RasterIO to 16 bit depth ?

You *can* use a byte array to write the scanline of a 16-bit image, but of
course in that case, the values written in the 16-bit image will only range from
0 to 255, and not the full 16 bit dynamic (GDAL will not automatically rescale
from 0-255 to 0-32767)

If you want to write values covering the full 16 bit dynamic, you will have to
use a short array and use GDT_Int16 in the RasterIO() call.

>
> --
> View this message in context:
>
http://osgeo-org.1803224.n2.nabble.com/Saving-16-bit-image-tp6606613p6606792.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>




More information about the gdal-dev mailing list