[gdal-dev] Alpha band data type

Even Rouault even.rouault at spatialys.com
Wed Jun 2 13:20:11 PDT 2021


Le 02/06/2021 à 22:08, Javier Jimenez Shaw a écrit :
> Hi Evert,
>
> As far as I know, TIFF data type is "constant" along the bands. You 
> cannot have a uint16 band and a byte band in the same page.
Yes, in theory this would be possible since the SampleFormat tag has as 
many values as bands 
(https://www.awaresystems.be/imaging/tiff/tifftags/sampleformat.html), 
but in practice libtiff only handles its value to be same for all bands 
(and similarly for BitsPerSample)
> If you are worried about space, you can use the "nodata value", 
> assigning a single value for that purpose (assuming that you do not 
> want intermediate values, just on and off). However I do not know if 
> this nodata is only for GDAL -and widely used-, or in the (Geo)TIFF 
> standard.
GDAL-only concept. See 
https://www.awaresystems.be/imaging/tiff/tifftags/gdal_nodata.html
>
> Cheers,
> Javier
> .___ ._ ..._ .. . ._. .___ .. __ . _. . __..  ... .... ._ .__
> Entre dos pensamientos racionales
> hay infinitos pensamientos irracionales.
>
>
>
> On Wed, 2 Jun 2021 at 21:44, Evert Etienne (SITEMARK) 
> <evert.etienne at sitemark.com <mailto:evert.etienne at sitemark.com>> wrote:
>
>     Dear all,
>
>     I was wondering if there is a best practice or guide for the data
>     type of alpha channels in geotiffs.
>     I have many files where the data type is constant over all bands
>     (UInt16 for example).
>     I would expect the alpha band to be a byte band or even bit.
>
>     Is it possible to have different types in a single file? If so,
>     can I change the type of the alpha band alone to see if it has
>     impact on the file size for example?
>
>     Many thanks
>
>     Evert
>     _______________________________________________
>     gdal-dev mailing list
>     gdal-dev at lists.osgeo.org <mailto:gdal-dev at lists.osgeo.org>
>     https://lists.osgeo.org/mailman/listinfo/gdal-dev
>     <https://lists.osgeo.org/mailman/listinfo/gdal-dev>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210602/a70377dc/attachment.html>


More information about the gdal-dev mailing list