Documentation
¶
Index ¶
- Constants
- Variables
- func Decode(r io.Reader, checkPrefix bool) (map[uint16]PhotoshopImageResource, error)
- func Encode(w io.Writer, source map[uint16]PhotoshopImageResource, addPrefix bool) error
- func Marshal(source map[uint16]PhotoshopImageResource, addPrefix bool) ([]byte, error)
- func ParseJpeg(sl *jpegstructure.SegmentList) (int, map[uint16]PhotoshopImageResource, error)
- func Unmarshal(data []byte, hasPrefix bool, dest *map[uint16]PhotoshopImageResource) error
- type PhotoshopImageResource
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 Marshal ¶
func Marshal(source map[uint16]PhotoshopImageResource, addPrefix bool) ([]byte, error)
func ParseJpeg ¶
func ParseJpeg(sl *jpegstructure.SegmentList) (int, 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
Click to show internal directories.
Click to hide internal directories.