im

package module
v0.0.0-...-f9f940c Latest Latest
Warning

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

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

README

im

Image metadata reading and writing (EXIF, IPTC, XMP etc)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Imeta

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

func Read

func Read(f io.ReadSeeker) (*Imeta, error)

Read reads from a ReadSeeker interface and extracts the metadata

func ReadFromBuf

func ReadFromBuf(b []byte) (*Imeta, error)

ReadFromBuf reads from a buffer and extracts the metadata

func ReadFromFile

func ReadFromFile(src string) (*Imeta, error)

ReadFromFile reads from an image file and extracts the metadata

type Item

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

type Rational

type Rational struct {
	Num, Denom uint32
}

type SRational

type SRational struct {
	Num, Denom int32
}

type Type

type Type int
const (
	TypeNone Type = iota
	TypeByte
	TypeAscii
	TypeShort    // 16 bit
	TypeLong     // 32 bit
	TypeRational // 2 x 32 bit unsigned
	TypeSByte
	TypeUndefine
	TypeSShort
	TypeSLong
	TypeSRational // 2 x 32 bit signed
	TypeFloat
	TypeDouble
	TypeXmp
)

func (Type) IsExif

func (t Type) IsExif() bool

IsExif returns true if this type is a valid EXIF type

func (Type) IsXmp

func (t Type) IsXmp() bool

IsXmp returns true if the type is an XMP string type

func (Type) Size

func (t Type) Size() int

Size returns the size in bytes for this type.

func (Type) String

func (t Type) String() string

String returns the name of the type

type Value

type Value struct {
	Type  Type
	Count int // Count of items
	// contains filtered or unexported fields
}

func NewValue

func NewValue(t Type, v any) (Value, error)

func (Value) Size

func (v Value) Size() int

func (Value) String

func (v Value) String() string

func (Value) Value

func (v Value) Value() any

type ValueError

type ValueError struct {
	Err  string
	Type Type
}

func (*ValueError) Error

func (e *ValueError) Error() string

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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