Documentation
¶
Overview ¶
Package tag provides types and functions for decoding Exif Tags
Index ¶
Constants ¶
View Source
const ( TypeByteSize = 1 TypeASCIISize = 1 TypeASCIINoNulSize = 1 TypeShortSize = 2 TypeLongSize = 4 TypeRationalSize = 8 TypeSignedLongSize = 4 TypeSignedRationalSize = 8 TypeIfdSize = 4 )
Tag sizes
Variables ¶
View Source
var ( ErrEmptyTag = errors.New("error empty tag") ErrTagNotValid = errors.New("error tag not valid") ErrNotEnoughData = errors.New("error not enough data to parse tag") )
Errors
View Source
var (
ErrTagTypeNotValid = errors.New("Tag type not valid")
)
Errors
Functions ¶
This section is empty.
Types ¶
type Tag ¶
type Tag struct { ValueOffset uint32 // 4 bytes UnitCount uint32 // 4 bytes ID ID // 2 bytes Ifd uint8 // 1 byte // contains filtered or unexported fields }
Tag is an Exif Tag
func NewTag ¶
NewTag returns a new Tag from tagID, tagType, unitCount, valueOffset and rawValueOffset. If tagType is Invalid returns ErrTagTypeNotValid
func (Tag) IsEmbedded ¶
IsEmbedded checks if the Tag's value is embedded in the Tag.ValueOffset
type Type ¶
type Type uint8
Type is the type of Tag
const ( TypeUnknown Type = 0 // TypeByte describes an encoded list of bytes. TypeByte Type = 1 // TypeASCII describes an encoded list of characters that is terminated // with a NUL in its encoded form. TypeASCII Type = 2 // TypeShort describes an encoded list of shorts. TypeShort Type = 3 // TypeLong describes an encoded list of longs. TypeLong Type = 4 // TypeRational describes an encoded list of rationals. TypeRational Type = 5 // TypeUndefined describes an encoded value that has a complex/non-clearcut // interpretation. TypeUndefined Type = 7 // TypeSignedShort describes an encoded list of signed shorts. (experimental) TypeSignedShort Type = 8 // TypeSignedLong describes an encoded list of signed longs. TypeSignedLong Type = 9 // TypeSignedRational describes an encoded list of signed rationals. TypeSignedRational Type = 10 // TypeASCIINoNul is just a pseudo-type, for our own purposes. TypeASCIINoNul Type = 0xf0 // TypeIfd is a pseudo-type, for our own purposes. TypeIfd Type = 0xf1 )
TagTypes defined Copied from dsoprea/go-exif
Click to show internal directories.
Click to hide internal directories.