Documentation
¶
Overview ¶
Package tiff reads the tags of the TIFF structure of EXIF data, in a JPEG image or a TIFF image, which libexif doesn't expose, or which are needed without cgo, such as the orientation of an image and its thumbnail
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Data ¶
Data returns the data from the TIFF header, which is after the EXIF header in a JPEG image, or at the start of a TIFF image or EXIF data, or after the four bytes before the EXIF data of a HEIF image, or nil when there isn't one
func Normalize ¶
Normalize returns the data of a RAW image which is TIFF data with a header of its own, such as an Olympus ORF image, which is IIRO, or a Panasonic RW2 image, which is IIU, with a TIFF header, so it can be read as TIFF data, or the data itself when it has a TIFF header, or nil when it isn't TIFF data
func Orientation ¶
Orientation returns the orientation of the image, from 1 to 8, as EXIF defines it, which is the transformation to display it (see artwork.Orient), or 1 when it doesn't have one, or it isn't valid
func PaletteAlpha ¶
PaletteAlpha returns the image of TIFF data which is an uncompressed palette image, with an alpha channel, with eight bits a sample, as Illustrator writes the preview of an EPS file, which golang.org/x/image/tiff reads as an image with one sample a pixel, or nil when it isn't one. Its tags don't need to be sorted.
func SortTags ¶
SortTags returns a copy of TIFF data whose image file directories have their entries sorted by their tags, as TIFF requires, which some applications don't do, such as Illustrator 8 in the preview of an EPS file, so a decoder which requires it can read it, or the data itself when it doesn't start with a TIFF header
func Thumbnail ¶
Thumbnail returns the thumbnail which is embedded in the EXIF data, which is usually a small JPEG image, such as 160x120, or nil when there isn't one, or it's outside the data. It's the data at the offset and with the length of the JPEGInterchangeFormat and JPEGInterchangeFormatLength tags of IFD1, from the TIFF header. It isn't checked that it's an image, as it can be cut short, such as when the image data has been removed.
Types ¶
This section is empty.