metadata

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterEXIFDecoder

func RegisterEXIFDecoder(d func(context.Context, []byte, ...image.ReadOption) (*EXIF, error))

func RegisterEXIFEncoder

func RegisterEXIFEncoder(e func(context.Context, *EXIF, ...image.WriteOption) ([]byte, error))

func RegisterICCDecoder

func RegisterICCDecoder(d func(context.Context, []byte, ...image.ReadOption) (*ICC, error))

func RegisterICCEncoder

func RegisterICCEncoder(e func(context.Context, *ICC, ...image.WriteOption) ([]byte, error))

func RegisterXMPDecoder

func RegisterXMPDecoder(d func(context.Context, []byte, ...image.ReadOption) (*XMP, error))

func RegisterXMPEncoder

func RegisterXMPEncoder(e func(context.Context, *XMP, ...image.WriteOption) ([]byte, error))

Types

type EXIF

type EXIF struct {
	// Image creator, EXIF tag 315
	Creator string
}

func DecodeEXIF

func DecodeEXIF(ctx context.Context, b []byte, opt ...image.ReadOption) (*EXIF, error)

func (*EXIF) Encode

func (x *EXIF) Encode(ctx context.Context, opt ...image.WriteOption) ([]byte, error)

type ICC

type ICC struct {
	CMMTypeSignature                 uint32
	ProfileVersion                   ProfileVersion
	ProfileClassSignature            uint32
	ColorSpace                       uint32
	ProfileConnectionSpace           uint32
	ProfileCreationTime              time.Time
	PrimaryPlatformSignature         uint32
	CMMFlags                         uint32
	DeviceManufacturer               uint32
	DeviceModel                      uint32
	DeviceAttributes                 uint32
	RenderingIntent                  uint32
	ProfileConnectionSpaceIlluminant XYZNumber
	ProfileCreatorSignature          uint32
}

ICC holds an ICC color profile.

func DecodeICC

func DecodeICC(ctx context.Context, b []byte, opt ...image.ReadOption) (*ICC, error)

func (*ICC) Encode

func (x *ICC) Encode(ctx context.Context, opt ...image.WriteOption) ([]byte, error)

type ProfileVersion

type ProfileVersion struct {
	// Major holds a BCD encoded major version number.
	Major uint8
	// Minor holds a BCD encoded minor and patch number. The first digit
	// is the minor version while the second is the patch level.
	Minor uint8
}

ProfileVersion holds a BCD encoded profile version number.

type Response16

type Response16 struct {
	// Interval holds the interval value
	Interval uint16
	// Measurement holds the measurement value.
	Measurement S15Fixed16
}

Response16 holds an iCC response16Number.

type S15Fixed16

type S15Fixed16 struct {
	Integer  int16
	Fraction uint16
}

S15Fixed16 holds a signed 32 bit fixed point number, with 1 sign bit, 15 integer bits, and 16 fractional bits.

type U16Fixed16

type U16Fixed16 struct {
	Integer  uint16
	Fraction uint16
}

U16Fixed16 holds an unsigned 32 bit fixed point number with 16 integer bits and 16 fractional bits.

type U8Fixed8

type U8Fixed8 struct {
	// Integer holds the unsigned 8 bit integer portion of the number.
	Integer uint8
	// Fraction holds the 8 bit fractional portion of the number.
	Fraction uint8
}

U8Fixed8 holds an unsigned 16 bit fixed point number, with 8 integer bits and 8 fraction bits.

type XMP

type XMP struct {
}

func DecodeXMP

func DecodeXMP(ctx context.Context, b []byte, opt ...image.ReadOption) (*XMP, error)

func (*XMP) Encode

func (x *XMP) Encode(ctx context.Context, opt ...image.WriteOption) ([]byte, error)

type XYZNumber

type XYZNumber struct {
	X S15Fixed16
	Y S15Fixed16
	Z S15Fixed16
}

XYZ number holds a CIE XYZ tristimulus value.

Directories

Path Synopsis
Package exif encodes and decodes EXIF format image metadata.
Package exif encodes and decodes EXIF format image metadata.
Package icc encodes and decodes ICC color profiles.
Package icc encodes and decodes ICC color profiles.
Package xmp encodes and decodes XMP format image metadata.
Package xmp encodes and decodes XMP format image metadata.

Jump to

Keyboard shortcuts

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