Versions in this module Expand all Collapse all v3 v3.0.1 Oct 12, 2022 Changes in this version + var EncodeDefaultByteOrder = binary.BigEndian + var ErrChildIfdNotMapped = errors.New("no child-IFD for that tag-ID under parent") + var ErrNotEnoughData = errors.New("not enough data for type") + var ErrNotFarValue = errors.New("not a far value") + var ErrParseFail = errors.New("parse failure") + var ErrUnhandledUndefinedTypedTag = errors.New("not a standard unknown-typed tag") + var ErrWrongType = errors.New("wrong type, can not parse") + var Ifd1StandardIfdIdentity = NewIfdIdentity(rootStandardIfd, IfdIdentityPart{ ... }) + var IfdExifIopStandardIfdIdentity = IfdExifStandardIfdIdentity.NewChild(iopStandardIfd, 0) + var IfdExifStandardIfdIdentity = IfdStandardIfdIdentity.NewChild(exifStandardIfd, 0) + var IfdGpsInfoStandardIfdIdentity = IfdStandardIfdIdentity.NewChild(gpsInfoStandardIfd, 0) + var IfdStandardIfdIdentity = NewIfdIdentity(rootStandardIfd, IfdIdentityPart{ ... }) + var TestDefaultByteOrder = binary.BigEndian + var TypeNames = map[TagTypePrimitive]string + func DumpBytes(data []byte) + func DumpBytesClause(data []byte) + func DumpBytesClauseToString(data []byte) string + func DumpBytesToString(data []byte) string + func ExifFullTimestampString(t time.Time) (fullTimestampPhrase string) + func FormatFromBytes(rawBytes []byte, tagType TagTypePrimitive, justFirst bool, ...) (phrase string, err error) + func FormatFromType(value interface{}, justFirst bool) (phrase string, err error) + func GetModuleRootPath() string + func GetTestAssetsPath() string + func IsTime(v interface{}) bool + func LoadStandardIfds(im *IfdMapping) (err error) + func ParseExifFullTimestamp(fullTimestampPhrase string) (timestamp time.Time, err error) + func TranslateStringToType(tagType TagTypePrimitive, valueString string) (value interface{}, err error) + type BasicTag struct + FqIfdPath string + IfdPath string + TagId uint16 + type EncodedData struct + Encoded []byte + Type TagTypePrimitive + UnitCount uint32 + type IfdIdentity struct + func NewIfdIdentity(ifdTag IfdTag, parts ...IfdIdentityPart) (ii *IfdIdentity) + func NewIfdIdentityFromString(im *IfdMapping, fqIfdPath string) (ii *IfdIdentity, err error) + func (ii *IfdIdentity) Equals(ii2 *IfdIdentity) bool + func (ii *IfdIdentity) IfdTag() IfdTag + func (ii *IfdIdentity) Index() int + func (ii *IfdIdentity) LeafPathPart() IfdIdentityPart + func (ii *IfdIdentity) Name() string + func (ii *IfdIdentity) NewChild(childIfdTag IfdTag, index int) (iiChild *IfdIdentity) + func (ii *IfdIdentity) NewSibling(index int) (iiSibling *IfdIdentity) + func (ii *IfdIdentity) String() string + func (ii *IfdIdentity) TagId() uint16 + func (ii *IfdIdentity) UnindexedString() string + type IfdIdentityPart struct + Index int + Name string + func (iip IfdIdentityPart) String() string + func (iip IfdIdentityPart) UnindexedString() string + type IfdMapping struct + func NewIfdMapping() (ifdMapping *IfdMapping) + func NewIfdMappingWithStandard() (ifdMapping *IfdMapping, err error) + func (im *IfdMapping) Add(parentPlacement []uint16, tagId uint16, name string) (err error) + func (im *IfdMapping) DumpLineages() (output []string, err error) + func (im *IfdMapping) FqPathPhraseFromLineage(lineage []IfdTagIdAndIndex) (fqPathPhrase string) + func (im *IfdMapping) Get(parentPlacement []uint16) (childIfd *MappedIfd, err error) + func (im *IfdMapping) GetChild(parentPathPhrase string, tagId uint16) (mi *MappedIfd, err error) + func (im *IfdMapping) GetWithPath(pathPhrase string) (mi *MappedIfd, err error) + func (im *IfdMapping) PathPhraseFromLineage(lineage []IfdTagIdAndIndex) (pathPhrase string) + func (im *IfdMapping) ResolvePath(pathPhrase string) (lineage []IfdTagIdAndIndex, err error) + func (im *IfdMapping) StripPathPhraseIndices(pathPhrase string) (strippedPathPhrase string, err error) + type IfdTag struct + func NewIfdTag(parentIfdTag *IfdTag, tagId uint16, name string) IfdTag + func (it IfdTag) Name() string + func (it IfdTag) ParentIfd() *IfdTag + func (it IfdTag) String() string + func (it IfdTag) TagId() uint16 + type IfdTagIdAndIndex struct + Index int + Name string + TagId uint16 + func (itii IfdTagIdAndIndex) String() string + type MappedIfd struct + Children map[uint16]*MappedIfd + Name string + ParentTagId uint16 + Path []string + Placement []uint16 + TagId uint16 + func (mi *MappedIfd) PathPhrase() string + func (mi *MappedIfd) String() string + type Parser struct + func (p *Parser) ParseAscii(data []byte, unitCount uint32) (value string, err error) + func (p *Parser) ParseAsciiNoNul(data []byte, unitCount uint32) (value string, err error) + func (p *Parser) ParseBytes(data []byte, unitCount uint32) (value []uint8, err error) + func (p *Parser) ParseDoubles(data []byte, unitCount uint32, byteOrder binary.ByteOrder) (value []float64, err error) + func (p *Parser) ParseFloats(data []byte, unitCount uint32, byteOrder binary.ByteOrder) (value []float32, err error) + func (p *Parser) ParseLongs(data []byte, unitCount uint32, byteOrder binary.ByteOrder) (value []uint32, err error) + func (p *Parser) ParseRationals(data []byte, unitCount uint32, byteOrder binary.ByteOrder) (value []Rational, err error) + func (p *Parser) ParseShorts(data []byte, unitCount uint32, byteOrder binary.ByteOrder) (value []uint16, err error) + func (p *Parser) ParseSignedLongs(data []byte, unitCount uint32, byteOrder binary.ByteOrder) (value []int32, err error) + func (p *Parser) ParseSignedRationals(data []byte, unitCount uint32, byteOrder binary.ByteOrder) (value []SignedRational, err error) + type Rational struct + Denominator uint32 + Numerator uint32 + type SignedRational struct + Denominator int32 + Numerator int32 + type TagTypePrimitive uint16 + const TypeAscii + const TypeAsciiNoNul + const TypeByte + const TypeDouble + const TypeFloat + const TypeLong + const TypeRational + const TypeShort + const TypeSignedLong + const TypeSignedRational + const TypeUndefined + func GetTypeByName(typeName string) (tagType TagTypePrimitive, found bool) + func (tagType TagTypePrimitive) IsValid() bool + func (tagType TagTypePrimitive) Size() int + func (typeType TagTypePrimitive) String() string + type ValueContext struct + func NewValueContext(ifdPath string, tagId uint16, unitCount, valueOffset uint32, ...) *ValueContext + func (vc *ValueContext) AddressableData() io.ReadSeeker + func (vc *ValueContext) ByteOrder() binary.ByteOrder + func (vc *ValueContext) Format() (value string, err error) + func (vc *ValueContext) FormatFirst() (value string, err error) + func (vc *ValueContext) GetFarOffset() (offset uint32, err error) + func (vc *ValueContext) IfdPath() string + func (vc *ValueContext) RawValueOffset() []byte + func (vc *ValueContext) ReadAscii() (value string, err error) + func (vc *ValueContext) ReadAsciiNoNul() (value string, err error) + func (vc *ValueContext) ReadBytes() (value []byte, err error) + func (vc *ValueContext) ReadDoubles() (value []float64, err error) + func (vc *ValueContext) ReadFloats() (value []float32, err error) + func (vc *ValueContext) ReadLongs() (value []uint32, err error) + func (vc *ValueContext) ReadRationals() (value []Rational, err error) + func (vc *ValueContext) ReadRawEncoded() (rawBytes []byte, err error) + func (vc *ValueContext) ReadShorts() (value []uint16, err error) + func (vc *ValueContext) ReadSignedLongs() (value []int32, err error) + func (vc *ValueContext) ReadSignedRationals() (value []SignedRational, err error) + func (vc *ValueContext) SetUndefinedValueType(tagType TagTypePrimitive) + func (vc *ValueContext) SizeInBytes() int + func (vc *ValueContext) TagId() uint16 + func (vc *ValueContext) UnitCount() uint32 + func (vc *ValueContext) ValueOffset() uint32 + func (vc *ValueContext) Values() (values interface{}, err error) + type ValueEncoder struct + func NewValueEncoder(byteOrder binary.ByteOrder) *ValueEncoder + func (ve *ValueEncoder) Encode(value interface{}) (ed EncodedData, err error)