Outside of astronomy, the TIFF standard is arguably the most commonly used format to store high-precision data/images. Unlike FITS however, the TIFF standard only supports images (not tables), but like FITS, it has support for all standard data types (see Numeric data types) which is the primary reason other fields use it.
Another similarity of the TIFF and FITS standards is that TIFF supports multiple images in one file. The TIFF standard calls each one of these images (and their accompanying meta-data) a ‘directory’ (roughly equivalent to the FITS extensions). Unlike FITS however, the directories can only be identified by their number (counting from zero), recall that in FITS you can also use the extension name to identify it.
The functions described here allow easy reading (and later writing) of TIFF files within Gnuastro or for users of Gnuastro’s libraries. Currently only reading is supported, but if you are interested, please get in touch with us.
name has a TIFF suffix.
This can be used to make sure that a given input file is TIFF.
gal_tiff_suffix_is_tiff for a list of recognized suffixes.
suffix is a recognized TIFF suffix.
The recognized suffixes are tif, tiff, TIFF and TIFF.
Return the number within
string as a
size_t number to identify a TIFF directory.
Note that the directories start counting from zero.
dir directory within the TIFF file
filename and return the contents of that TIFF directory as
If the directory’s image contains multiple channels, the output will be a list (see List of