[gdal-dev] Alpha band data type

Javier Jimenez Shaw j1 at jimenezshaw.com
Wed Jun 2 13:08:26 PDT 2021


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.
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.

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> 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
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210602/066ec5cf/attachment.html>


More information about the gdal-dev mailing list