[gdal-dev] ALPHA and PHOTOMETRIC options in TIFF

Javier Jimenez Shaw j1 at jimenezshaw.com
Sat Jun 5 01:24:19 PDT 2021


Hi

I am struggling to save my data in (Geo)TIFF files with the proper creation
options.
My data is not standard RGB(A), but a collection of bands like red, green,
(not necessarily blue), another type of red, near infrared, etc, and Alpha.
It can be uint8, uint16 or float.

I was using PHOTOMETRIC=MINISBLACK and ALPHA=YES, but now I am not sure if
this is the proper configuration. In addition to that, I am setting a
ColorInterpretation to the bands (many bands as GCI_Undefined, like for
Near Infrared. The alpha band is clear as GCI_AlphaBand).

The "extra samples" is obscure to me, I do not know how many bands expects,
and how many are "extra". (
https://www.awaresystems.be/imaging/tiff/tifftags/extrasamples.html)

TIFF says "There is no default for PhotometricInterpretation, and it is
required. Do not rely on applications defaulting to what you want." in
https://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html

How should I create my TIFFs?

Thanks.
.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__
Entre dos pensamientos racionales
hay infinitos pensamientos irracionales.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210605/932fdc4a/attachment.html>


More information about the gdal-dev mailing list