Documentation ¶
Overview ¶
Package ps implements Adobe Photoshop metadata as defined by XMP Specification Part 2 Chapter 3.2.
Index ¶
- Constants
- Variables
- func NewModel(name string) xmp.Model
- type Anchestor
- type AnchestorArray
- type ColorMode
- type Layer
- type LayerList
- type PhotoshopInfo
- func (x PhotoshopInfo) Can(nsName string) bool
- func (x *PhotoshopInfo) CanTag(tag string) bool
- func (x *PhotoshopInfo) GetTag(tag string) (string, error)
- func (x PhotoshopInfo) Namespaces() xmp.NamespaceList
- func (x *PhotoshopInfo) SetTag(tag, value string) error
- func (x *PhotoshopInfo) SyncFromXMP(d *xmp.Document) error
- func (x *PhotoshopInfo) SyncModel(d *xmp.Document) error
- func (x PhotoshopInfo) SyncToXMP(d *xmp.Document) error
Constants ¶
View Source
const ( ColorModeBitmap = 0 // 0 = Bitmap ColorModeGrayscale = 1 // 1 = Gray scale ColorModeIndexed = 2 // 2 = Indexed colour ColorModeRGB = 3 // 3 = RGB colour ColorModeCMYK = 4 // 4 = CMYK colour ColorModeMultiChannel = 7 // 7 = Multi-channel ColorModeDuotone = 8 // 8 = Duotone ColorModeLAB = 9 // 9 = LAB colour )
Variables ¶
View Source
var (
NsPhotoshop = xmp.NewNamespace("photoshop", "http://ns.adobe.com/photoshop/1.0/", NewModel)
)
Functions ¶
Types ¶
type AnchestorArray ¶
type AnchestorArray []Anchestor
func (AnchestorArray) MarshalXMP ¶
func (AnchestorArray) Typ ¶
func (x AnchestorArray) Typ() xmp.ArrayType
func (*AnchestorArray) UnmarshalXMP ¶
type Layer ¶
type Layer struct { LayerName string `xmp:"photoshop:LayerName"` LayerText string `xmp:"photoshop:LayerText"` }
3.2.1.2 Layer
type PhotoshopInfo ¶
type PhotoshopInfo struct { AuthorsPosition string `xmp:"photoshop:AuthorsPosition"` CaptionWriter string `xmp:"photoshop:CaptionWriter"` Category string `xmp:"photoshop:Category"` City string `xmp:"photoshop:City"` ColorMode ColorMode `xmp:"photoshop:ColorMode"` Country string `xmp:"photoshop:Country"` Credit string `xmp:"photoshop:Credit"` DateCreated xmp.Date `xmp:"photoshop:DateCreated"` DocumentAncestors AnchestorArray `xmp:"photoshop:DocumentAncestors"` Headline string `xmp:"photoshop:Headline"` History string `xmp:"photoshop:History"` ICCProfile string `xmp:"photoshop:ICCProfile"` Instructions string `xmp:"photoshop:Instructions"` Layer *Layer `xmp:"photoshop:Layer"` SidecarForExtension string `xmp:"photoshop:SidecarForExtension"` // "NEF" Source string `xmp:"photoshop:Source"` State string `xmp:"photoshop:State"` SupplementalCategories xmp.StringArray `xmp:"photoshop:SupplementalCategories"` TextLayers LayerList `xmp:"photoshop:TextLayers"` TransmissionReference string `xmp:"photoshop:TransmissionReference"` Urgency int `xmp:"photoshop:Urgency"` // 1 - 8 EmbeddedXMPDigest string `xmp:"photoshop:EmbeddedXMPDigest,omit"` // "00000000000000000000000000000000" LegacyIPTCDigest string `xmp:"photoshop:LegacyIPTCDigest,omit"` // "AA5133A9479EA0F732E6A7414060A81F" }
func FindModel ¶
func FindModel(d *xmp.Document) *PhotoshopInfo
func (PhotoshopInfo) Can ¶
func (x PhotoshopInfo) Can(nsName string) bool
func (*PhotoshopInfo) CanTag ¶
func (x *PhotoshopInfo) CanTag(tag string) bool
func (PhotoshopInfo) Namespaces ¶
func (x PhotoshopInfo) Namespaces() xmp.NamespaceList
func (*PhotoshopInfo) SetTag ¶
func (x *PhotoshopInfo) SetTag(tag, value string) error
func (*PhotoshopInfo) SyncFromXMP ¶
func (x *PhotoshopInfo) SyncFromXMP(d *xmp.Document) error
Click to show internal directories.
Click to hide internal directories.