exif

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EXIF

type EXIF struct {
	// contains filtered or unexported fields
}

func Open

func Open(path string) (*EXIF, error)

func Parse

func Parse(data []byte) (*EXIF, error)

func Read

func Read(r io.Reader) (*EXIF, error)

func (*EXIF) Close

func (e *EXIF) Close() error

func (*EXIF) MakerNote

func (e *EXIF) MakerNote() *MakerNote

func (*EXIF) MarshalJSON

func (e *EXIF) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*EXIF) Tags

func (e *EXIF) Tags() []*Tag

type IFD

type IFD uint

IFD identifies which Image File Directory an entry belongs to.

type MakerNote

type MakerNote struct {
	// contains filtered or unexported fields
}

func (*MakerNote) MarshalJSON

func (m *MakerNote) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

type Tag

type Tag struct {
	// contains filtered or unexported fields
}

func (*Tag) Any

func (t *Tag) Any() any

Any returns the tag's data decoded into an appropriate Go type (implements media.Metadata). For single-component tags: uint8, int8, uint16, int16, uint32, int32, libexif.Rational, libexif.SRational, float32, float64, or string (ASCII). For multi-component tags the corresponding slice type is returned. UNDEFINED format is returned as []byte.

func (*Tag) Bytes

func (t *Tag) Bytes() []byte

Bytes returns nil for EXIF tags (implements media.Metadata).

func (*Tag) Components

func (t *Tag) Components() uint

Components returns the number of values in the tag's data array.

func (*Tag) Format

func (t *Tag) Format() libexif.Format

Format returns the EXIF data format of the tag.

func (*Tag) IFD

func (t *Tag) IFD() IFD

IFD returns which Image File Directory this tag belongs to.

func (*Tag) Image

func (t *Tag) Image() image.Image

Image returns nil for EXIF tags (implements media.Metadata).

func (*Tag) Key

func (t *Tag) Key() string

Key returns "tiff:Name" for IFD0/IFD1 tags and "exif:Name" for EXIF/GPS/Interop tags (implements media.Metadata). The prefix aligns with XMP namespace conventions so cross-source lookups work uniformly across pkg/exif and pkg/xmp.

func (*Tag) MarshalJSON

func (t *Tag) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*Tag) Name

func (t *Tag) Name() string

Name returns the tag name.

func (*Tag) String

func (t *Tag) String() string

String implements fmt.Stringer.

func (*Tag) Tag

func (t *Tag) Tag() TagType

Tag returns the numeric tag identifier.

func (*Tag) Value

func (t *Tag) Value() string

Value returns the libexif-formatted string representation of the tag value (implements media.Metadata).

type TagType

type TagType uint

TagType is the numeric EXIF tag identifier.

Jump to

Keyboard shortcuts

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