Documentation
¶
Index ¶
Constants ¶
const ( ErrInFirstIFD = "error in first IFD: %v" ErrInNthIFD = "error in IFD #%v: %v" )
const ErrSizeErrorInType = "size error in type: %v"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TIFF ¶
type TIFF struct {
// contains filtered or unexported fields
}
TIFF is an object storing information about TIFF file conforming to the TIFF 6.0 Specification.
TIFF format was developed by Aldus Corporation. At this moment, in the year 2023, the owner of this technology is Adobe Inc., who bought Aldus Corporation in September 1994. More information about TIFF format can be found in Wikipedia: https://en.wikipedia.org/wiki/TIFF
TIFF specification (Revision 6.0 Final — June 3, 1992): https://developer.adobe.com/content/dam/udp/en/open/standards/tiff/TIFF6.pdf
Current implementation of this format is experimental. The main purpose of this library is reading meta-data from TIFF files.
func New ¶
func New(stream iors.ReaderSeeker) (t *TIFF, err error)
New constructs the TIFF object from the byte reader.
Due to the nature of TIFF format, which is highly complex and controversial, the object is constructed in several passes, similar to some video encoders that require two passes. On the first pass we collect brief data about IFDs and their directory entries. On the second pass we collect data item values for those tags which we are interested in. On the third pass we collect information about so-called Sub-IFDs, which are not a part of the TIFF 6.0 Specification, but they are used by some tools.