photoshop

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IptcId   uint16 = 0x0404
	DigestId uint16 = 0x0425
)

Variables

View Source
var ErrNoData = fmt.Errorf("Block contains no data")
View Source
var ErrNoPhotoshopBlock = fmt.Errorf("Image contained no photoshop data")
View Source
var ErrNoPrefix = fmt.Errorf("Block does not contain photoshop prefix")

Functions

func Decode

func Decode(r io.Reader, checkPrefix bool) (map[uint16]PhotoshopImageResource, error)

func Encode

func Encode(w io.Writer, source map[uint16]PhotoshopImageResource, addPrefix bool) error

func Marshal

func Marshal(source map[uint16]PhotoshopImageResource, addPrefix bool) ([]byte, error)

func Unmarshal

func Unmarshal(data []byte, hasPrefix bool, dest *map[uint16]PhotoshopImageResource) error

Types

type PhotoshopImageResource

type PhotoshopImageResource struct {
	Signature  string //4 bytes. Should be '8BIM'
	ResourceId uint16
	Name       string //pascal encoded, padded to make the size even. (null name consists of two bytes of 0)
	Data       []byte
}

func NewPhotoshopImageResource

func NewPhotoshopImageResource(resourceId uint16, data []byte) PhotoshopImageResource

func (PhotoshopImageResource) String

func (ir PhotoshopImageResource) String() string

Jump to

Keyboard shortcuts

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