Documentation
¶
Overview ¶
Package tiff provides support for decoding the structure of TIFF 6.0 files.
The specification can be found at http://www.exif.org/TIFF6.pdf.
Index ¶
- type Ascii
- type Byte
- type ByteOrder
- func (order ByteOrder) Long(b []byte) Long
- func (order ByteOrder) Offset(b []byte) int64
- func (order ByteOrder) Rational(b []byte) (r Rational)
- func (order ByteOrder) ReadIFD(r io.ReaderAt, offset int64) *IFD
- func (order ByteOrder) Short(b []byte) Short
- func (order ByteOrder) Slong(b []byte) Slong
- func (order ByteOrder) Srational(b []byte) (r Srational)
- type Double
- type Entry
- type File
- type Float
- type Header
- type IFD
- type Long
- type Rational
- type Sbyte
- type Short
- type Slong
- type Srational
- type Sshort
- type TagCount
- type TagID
- type TagSpace
- type TagType
- type TagValue
- type Undefined
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteOrder ¶
A ByteOrder represents the byte order of a TIFF file and supports decoding of the various TIFF types.
type Entry ¶
type Entry struct { Offset int64 // Offset of this Entry within its associated ReaderAt Tag TagID // Tag code Type TagType // Tag type Count TagCount // How many elements of type Type are covered by this Entry Value TagValue // Value or offset to value if it doesn't fit in 4 bytes }
An Entry contains the data for a single entry or field in an IFD (Image Field Directory).
func (Entry) ValueByteSize ¶
ValueByteSize returns the total byte size of e.Entry's Value.
func (Entry) ValueIsOffset ¶
Returns true if e.Value is an offset to where the value data can be found.
type File ¶
A File represents a decoded TIFF file.
func (File) EntryReader ¶
EntryReader returns a ReaderAt which can be used to extract the bytes associated with an Entry.
type TagCount ¶
type TagCount uint32
A TagCount describes how many repeated elements there are of e.Type in this Entry.
type TagID ¶
type TagID uint16
A TagID represents the 16 bit integer identifier for an IFD tag.
type TagSpace ¶
type TagSpace struct {
// contains filtered or unexported fields
}
A TagSpace represents a (named) collection of TIFF tags.
var BaseLine TagSpace = CreateTagSpace("BaseLine")
var Exif TagSpace = CreateTagSpace("Exif")
var Extension TagSpace = CreateTagSpace("Extension")
var Gps TagSpace = CreateTagSpace("Gps")
var Private TagSpace = CreateTagSpace("Private")
func CreateTagSpace ¶
CreateTagSpace returns a new TagSpace labelled name.
type TagType ¶
type TagType uint16
A TagType represents the 16 bit code for the different tag types defined by the TIFF spec.