iptc

package
v3.24.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse added in v3.18.0

func Parse(data []byte, m IptcMap) error

Types

type IptcMap

type IptcMap map[TagKey][]TagValue

func (IptcMap) AddTag

func (m IptcMap) AddTag(key TagKey, data []byte) error

func (IptcMap) Dump

func (m IptcMap) Dump() []byte

func (IptcMap) MarshalJSON

func (m IptcMap) MarshalJSON() ([]byte, error)

type TagFormat

type TagFormat int
const (
	TagFormatByte TagFormat = iota
	TagFormatShort
	TagFormatLong
	TagFormatString
	TagFormatBinary
	TagFormatDate
	TagFormatTime
)

type TagInfo

type TagInfo struct {
	Name       string
	Title      string
	Format     TagFormat
	Required   bool
	Repeatable bool
	MinSize    int
	MaxSize    int
}

func GetTagInfo

func GetTagInfo(key TagKey) (TagInfo, error)

type TagKey

type TagKey struct {
	RecordID byte
	TagID    byte
}

type TagValue

type TagValue struct {
	Format TagFormat
	Raw    []byte
}

func (TagValue) Int

func (v TagValue) Int() int

func (TagValue) MarshalJSON

func (v TagValue) MarshalJSON() ([]byte, error)

func (TagValue) Typecast

func (v TagValue) Typecast() interface{}

Jump to

Keyboard shortcuts

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