tiff

package
v0.5.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrInFirstIFD = "error in first IFD: %v"
	ErrInNthIFD   = "error in IFD #%v: %v"
)
View Source
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.

func (*TIFF) Header

func (t *TIFF) Header() (header *hdr.Header)

Header returns TIFF's header.

func (*TIFF) IFDs

func (t *TIFF) IFDs() (ifds []*ifd.IFD)

IFDs returns an array of TIFF's IFDs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL