Documentation
¶
Index ¶
- Constants
- type HEIF
- func (h *HEIF) At(x, y int) color.Color
- func (h *HEIF) Bounds() image.Rectangle
- func (h *HEIF) Close() error
- func (h *HEIF) ColorModel() color.Model
- func (h *HEIF) Decode() (image.Image, error)
- func (h *HEIF) Metadata() []metadata.Metadata
- func (h *HEIF) Primary() image.Image
- func (h *HEIF) Thumbnails() []image.Image
- func (h *HEIF) XMP() *xmp.XMP
- type Meta
Constants ¶
const ( // Namespace is the namespace of the metadata blocks of a HEIF image which // aren't EXIF or XMP data Namespace = "heif" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HEIF ¶
type HEIF struct {
// contains filtered or unexported fields
}
HEIF wraps a libheif context and exposes the primary image as an image.Image. The primary image is decoded when its pixels are first read, with At or Primary, so its size, color model, metadata and thumbnails are read without decoding it.
func (*HEIF) At ¶
At returns the color of the pixel at x, y in the primary image, which is decoded when it hasn't been.
func (*HEIF) ColorModel ¶
ColorModel returns the color model of the primary image, without decoding it.
func (*HEIF) Decode ¶
Decode returns the decoded primary image, which is decoded when it hasn't been, or an error when it can't be decoded.
func (*HEIF) Metadata ¶
Metadata returns metadata from the primary image.
EXIF and XMP payloads are parsed and expanded into their structured metadata entries. Any remaining blocks are returned as generic HEIF metadata records.
func (*HEIF) Primary ¶
Primary returns the decoded primary image, which is decoded when it hasn't been, or nil when it can't be decoded (see Decode).
func (*HEIF) Thumbnails ¶
Thumbnails returns any attached thumbnail images for the primary image.
type Meta ¶
type Meta struct {
// contains filtered or unexported fields
}