pm

package
v0.0.0-...-5d8e3e1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2025 License: BSD-3-Clause, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package pm implements metadata written by Photomechanic software found in many professional images.

Index

Constants

This section is empty.

Variables

View Source
var (
	NsPm = xmp.NewNamespace("photomechanic", "http://ns.camerabits.com/photomechanic/1.0/", NewModel)
)

Functions

func NewModel

func NewModel(name string) xmp.Model

Types

type Photomechanic

type Photomechanic struct {
	EditStatus        string          `xmp:"photomechanic:EditStatus"`        // edit status field from IPTC record
	ColorClass        int             `xmp:"photomechanic:ColorClass"`        // USA
	CountryCode       string          `xmp:"photomechanic:CountryCode"`       // USA
	TimeCreated       Time            `xmp:"photomechanic:TimeCreated"`       // HHMMSS+dHdS
	Prefs             Preferences     `xmp:"photomechanic:Prefs"`             // T:C:R:F
	Tagged            xmp.Bool        `xmp:"photomechanic:Tagged"`            // "True"
	Version           string          `xmp:"photomechanic:PMVersion"`         // PM5
	ColorClassEval    int             `xmp:"photomechanic:ColorClassEval"`    // ="2"
	ColorClassApply   xmp.Bool        `xmp:"photomechanic:ColorClassApply"`   // ="True"
	RatingEval        int             `xmp:"photomechanic:RatingEval"`        // ="4"
	RatingApply       xmp.Bool        `xmp:"photomechanic:RatingApply"`       // ="True"
	TagEval           int             `xmp:"photomechanic:TagEval"`           // ="0"
	TagApply          xmp.Bool        `xmp:"photomechanic:TagApply"`          // ="False"
	CaptionMergeStyle int             `xmp:"photomechanic:CaptionMergeStyle"` // ="1"
	ApplyAPCustom     int             `xmp:"photomechanic:ApplyAPCustom"`     // ="0"
	MergeAPCustom     int             `xmp:"photomechanic:MergeAPCustom"`     // ="0"
	ApplyDateType     int             `xmp:"photomechanic:ApplyDateType"`     // ="2"
	FieldsToApply     xmp.StringArray `xmp:"photomechanic:FieldsToApply"`
}

func FindModel

func FindModel(d *xmp.Document) *Photomechanic

func MakeModel

func MakeModel(d *xmp.Document) (*Photomechanic, error)

func (Photomechanic) Can

func (x Photomechanic) Can(nsName string) bool

func (*Photomechanic) CanTag

func (x *Photomechanic) CanTag(tag string) bool

func (*Photomechanic) GetTag

func (x *Photomechanic) GetTag(tag string) (string, error)

func (*Photomechanic) Namespaces

func (x *Photomechanic) Namespaces() xmp.NamespaceList

func (*Photomechanic) SetTag

func (x *Photomechanic) SetTag(tag, value string) error

func (*Photomechanic) SyncFromXMP

func (x *Photomechanic) SyncFromXMP(d *xmp.Document) error

func (*Photomechanic) SyncModel

func (x *Photomechanic) SyncModel(d *xmp.Document) error

func (Photomechanic) SyncToXMP

func (x Photomechanic) SyncToXMP(d *xmp.Document) error

type Preferences

type Preferences struct {
	TagStatus  int // T = Tag status (0 or 1)
	ColorClass int // C = Color Class value (0-8)
	Rating     int // R = Rating (0-5)
	Frame      int // F = Frame number of image or -1 if undetermined
}

T:C:R:F

func (Preferences) IsZero

func (x Preferences) IsZero() bool

func (Preferences) MarshalText

func (x Preferences) MarshalText() ([]byte, error)

func (*Preferences) UnmarshalText

func (x *Preferences) UnmarshalText(data []byte) error

type Time

type Time time.Time

func (Time) IsZero

func (x Time) IsZero() bool

func (Time) MarshalText

func (x Time) MarshalText() ([]byte, error)

func (*Time) UnmarshalText

func (x *Time) UnmarshalText(data []byte) error

Jump to

Keyboard shortcuts

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