meta

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package meta contains meta types for image metadata

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidHeader is an error for an Invalid ExifHeader
	ErrInvalidHeader = errors.New("error ExifHeader is not valid")

	// ErrNoExif is an error for when no exif is found
	ErrNoExif = errors.New("error no Exif")

	// ErrBufLength
	ErrBufLength = errors.New("error buffer length insufficient")
)

Common Errors

View Source
var (

	// ErrUUIDFormat is returned for an incorrect UUID format.
	ErrUUIDFormat = errors.New("uuid: incorrect UUID format")

	// ErrUUIDLength is returned for an incorrect UUID length.
	ErrUUIDLength = errors.New("uuid: incorrect UUID length")
)

String parse helpers.

View Source
var NilUUID = UUID{}

NilUUID is special form of UUID that is specified to have all 128 bits set to zero.

Functions

func CleanXMPSuffixWhiteSpace

func CleanXMPSuffixWhiteSpace(buf []byte) []byte

CleanXMPSuffixWhiteSpace returns the same slice with the whitespace after "</x:xmpmeta>" removed.

Types

type Aperture

type Aperture float32

Aperture contains the F-Number.

func NewAperture

func NewAperture(n uint32, d uint32) Aperture

NewAperture returns a new Aperture by dividing the "n" numerator over the "d" demoninator

func (*Aperture) DecodeMsg

func (z *Aperture) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (Aperture) EncodeMsg

func (z Aperture) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (Aperture) MarshalMsg

func (z Aperture) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (Aperture) MarshalText

func (aa Aperture) MarshalText() (text []byte, err error)

MarshalText implements the TextMarshaler interface that is used by encoding/json

func (Aperture) Msgsize

func (z Aperture) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Aperture) ParseString

func (aa *Aperture) ParseString(buf []byte) error

ParseString parses a string for an aperture value. ex: 1/100 or 300/100

func (Aperture) String

func (aa Aperture) String() string

func (*Aperture) UnmarshalMsg

func (z *Aperture) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (*Aperture) UnmarshalText

func (aa *Aperture) UnmarshalText(text []byte) (err error)

UnmarshalText implements the TextUnmarshaler interface that is used by encoding/json.

type Compression

type Compression uint16

Compression is Exif Compression.

func (*Compression) DecodeMsg

func (z *Compression) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (Compression) EncodeMsg

func (z Compression) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (Compression) MarshalMsg

func (z Compression) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (Compression) Msgsize

func (z Compression) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (Compression) String

func (c Compression) String() string

String is for Compression stringer interface

func (*Compression) UnmarshalMsg

func (z *Compression) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type DecodeFn

type DecodeFn func(io.Reader, *Metadata) error

DecodeFn is a function for decoding Metadata.

For Exif Metadata use ExifHeader and ExifFn.

For Xmp Metadata use XmpHeader and XmpFn.

type Dimensions

type Dimensions struct {
	Width  uint32
	Height uint32
}

Dimensions stores width and height

func NewDimensions

func NewDimensions(width, height uint32) Dimensions

NewDimensions returns Dimensions with the given width and height

func (Dimensions) AspectRatio

func (d Dimensions) AspectRatio() float32

AspectRatio calculates the Aspect ratio of the Image (Width/Height)

func (*Dimensions) DecodeMsg

func (z *Dimensions) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (Dimensions) EncodeMsg

func (z Dimensions) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (Dimensions) MarshalMsg

func (z Dimensions) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (Dimensions) Msgsize

func (z Dimensions) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (Dimensions) Orientation

func (d Dimensions) Orientation() uint

Orientation -

func (Dimensions) Size

func (d Dimensions) Size() (width, height uint32)

Size returns width and height from underlying dimensions

func (Dimensions) String

func (d Dimensions) String() string

func (*Dimensions) UnmarshalMsg

func (z *Dimensions) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type ExifHeader

type ExifHeader struct {
	FirstIfdOffset   uint32
	TiffHeaderOffset uint32
	ExifLength       uint32
	ByteOrder        utils.ByteOrder
	FirstIfd         ifds.IfdType
	ImageType        imagetype.ImageType
}

ExifHeader is the first 8 bytes of a Tiff Directory.

A Header contains the byte Order, first Ifd Offset, Tiff Header offset, Exif Length (0 if unknown) and Image type for the parsing of the Exif information from a Tiff Directory.

func NewExifHeader

func NewExifHeader(byteOrder utils.ByteOrder, firstIfdOffset, tiffHeaderOffset uint32, exifLength uint32, imageType imagetype.ImageType) ExifHeader

NewExifHeader returns a new ExifHeader.

func (ExifHeader) IsValid

func (h ExifHeader) IsValid() bool

IsValid returns true if the ExifHeader ByteOrder is not nil and the FirstIfdOffset is greater than 0

func (ExifHeader) MarshalZerologObject

func (h ExifHeader) MarshalZerologObject(e *zerolog.Event)

MarshalZerologObject is a zerolog interface for logging

func (ExifHeader) String

func (h ExifHeader) String() string

type ExposureBias

type ExposureBias int16

ExposureBias is the Exposure Bias of an image expressed as a positive or negative fraction. Bit1 = Sign Bit2-7 = Numerator Bit8-15 = Denominator Bit16 = Empty

func NewExposureBias

func NewExposureBias(n int16, d int16) ExposureBias

NewExposureBias creates a new Exposure Bias from the provided "n" as numerator and "d" as denominator.

To parse a string expressed as a positive or negative fraction. ex: "+1/3" or ex: "-2/3" use ExposureBias.UnmarshalText.

func (*ExposureBias) DecodeMsg

func (z *ExposureBias) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (ExposureBias) EncodeMsg

func (z ExposureBias) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (ExposureBias) MarshalMsg

func (z ExposureBias) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (ExposureBias) MarshalText

func (eb ExposureBias) MarshalText() (text []byte, err error)

MarshalText implements the TextMarshaler interface that is used by encoding/json

func (ExposureBias) Msgsize

func (z ExposureBias) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (ExposureBias) String

func (eb ExposureBias) String() string

String returns the value of Exposure Bias as a string

func (*ExposureBias) UnmarshalMsg

func (z *ExposureBias) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (*ExposureBias) UnmarshalText

func (eb *ExposureBias) UnmarshalText(text []byte) (err error)

UnmarshalText implements the TextUnmarshaler interface that is used by encoding/json

type ExposureMode

type ExposureMode uint16

ExposureMode is the mode in which the Exposure was taken.

Derived from https://sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html (07/02/2021)
const (
	ExposureModeAuto ExposureMode = iota
	ExposureModeManual
	ExposureModeAutoBracket
)

Exposure Modes

func NewExposureMode

func NewExposureMode(em uint8) ExposureMode

NewExposureMode returns an ExposureMode from the given uint8

func (*ExposureMode) DecodeMsg

func (z *ExposureMode) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (ExposureMode) EncodeMsg

func (z ExposureMode) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (ExposureMode) MarshalMsg

func (z ExposureMode) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (ExposureMode) MarshalText

func (em ExposureMode) MarshalText() (text []byte, err error)

MarshalText implements the TextMarshaler interface

func (ExposureMode) Msgsize

func (z ExposureMode) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (ExposureMode) String

func (em ExposureMode) String() string

String returns an ExposureMode as a string

func (*ExposureMode) UnmarshalMsg

func (z *ExposureMode) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (*ExposureMode) UnmarshalText

func (em *ExposureMode) UnmarshalText(text []byte) (err error)

UnmarshalText implements the TextUnmarshaler interface that is used by encoding/json

type ExposureProgram

type ExposureProgram uint16

ExposureProgram is the program in which the image was taken.

Derived from https://sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html (23/09/2019)

0: "Not Defined",
1: "Manual",
2: "Program AE",
3: "Aperture-priority AE",
4: "Shutter speed priority AE",
5: "Creative (Slow speed)",
6: "Action (High speed)",
7: "Portrait",
8: "Landscape",
9: "Bulb",
const (
	ExposureProgramNotDefined ExposureProgram = iota
	ExposureProgramManual
	ExposureProgramProgramAE
	ExposureProgramAperturePriority
	ExposureProgramShutterSpeedPriority
	ExposureProgramCreative
	ExposureProgramAction
	ExposureProgramPortrait
	ExposureProgramLandscape
	ExposureProgramBulb
)

Exposure Programs

func NewExposureProgram

func NewExposureProgram(ep uint8) ExposureProgram

NewExposureProgram returns an ExposureProgram from the given uint8

func (*ExposureProgram) DecodeMsg

func (z *ExposureProgram) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (ExposureProgram) EncodeMsg

func (z ExposureProgram) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (ExposureProgram) MarshalMsg

func (z ExposureProgram) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (ExposureProgram) MarshalText

func (ep ExposureProgram) MarshalText() (text []byte, err error)

MarshalText implements the TextMarshaler interface

func (ExposureProgram) Msgsize

func (z ExposureProgram) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (ExposureProgram) String

func (ep ExposureProgram) String() string

String returns an ExposureProgram as a string

func (*ExposureProgram) UnmarshalMsg

func (z *ExposureProgram) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (*ExposureProgram) UnmarshalText

func (ep *ExposureProgram) UnmarshalText(text []byte) (err error)

UnmarshalText implements the TextUnmarshaler interface that is used by encoding/json

type ExposureTime

type ExposureTime float32

func (*ExposureTime) DecodeMsg

func (z *ExposureTime) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (ExposureTime) EncodeMsg

func (z ExposureTime) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (ExposureTime) MarshalMsg

func (z ExposureTime) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (ExposureTime) MarshalText

func (et ExposureTime) MarshalText() (text []byte, err error)

MarshalText implements the TextMarshaler interface that is used by encoding/json

func (ExposureTime) Msgsize

func (z ExposureTime) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (ExposureTime) String

func (et ExposureTime) String() string

func (*ExposureTime) UnmarshalMsg

func (z *ExposureTime) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Flash

type Flash uint16

Flash is in bit format and represents the mode in which flash was used.

Derived from https://sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html#Flash (23/09/2019)

const (
	FlashNoFlash Flash = 0
	FlashFired   Flash = 1
)

Flashtypes

func NewFlash

func NewFlash(f uint8) Flash

NewFlash returns a new Flash value

func (*Flash) DecodeMsg

func (z *Flash) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (Flash) EncodeMsg

func (z Flash) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (Flash) Fired

func (f Flash) Fired() bool

Fired is bit 0, returns true if Flash was fired.

func (Flash) FlashFunction

func (f Flash) FlashFunction() bool

FlashFunction is bit 5, returns true if flash function was not present

func (Flash) MarshalMsg

func (z Flash) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (Flash) Mode

func (f Flash) Mode() FlashMode

Mode is bits 3 and 4, returns 0 if "NoFlash", 8 if "On", 16 if "Off", and 24 if "Auto".

 FlashModeNone: 0
	FlashModeOn: 8
	FlashModeOff: 16
	FlashModeAuto: 24

func (Flash) Msgsize

func (z Flash) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (Flash) Redeye

func (f Flash) Redeye() bool

Redeye is bit 6, returns true if "Red-eye reduction" was present

func (Flash) ReturnStatus

func (f Flash) ReturnStatus() FlashMode

ReturnStatus is bits 1 and 2, returns 4 if "No Return" present and 6 if "Return" present.

FlashNoReturn: 4
FlashReturn:  6

func (Flash) String

func (f Flash) String() string

String returns an ExposureProgram as a string

func (*Flash) UnmarshalMsg

func (z *Flash) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type FlashMode

type FlashMode uint8

FlashMode is what mode the flash was used in

const (
	FlashModeNone FlashMode = 0
	FlashNoReturn FlashMode = 4
	FlashReturn   FlashMode = 6
	FlashModeOn   FlashMode = 8
	FlashModeOff  FlashMode = 16
	FlashModeAuto FlashMode = 24
)

FlashModes

func (*FlashMode) DecodeMsg

func (z *FlashMode) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (FlashMode) EncodeMsg

func (z FlashMode) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (FlashMode) MarshalMsg

func (z FlashMode) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (FlashMode) Msgsize

func (z FlashMode) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*FlashMode) UnmarshalMsg

func (z *FlashMode) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type FocalLength

type FocalLength float32

FocalLength is a Focal Length expressed in millimeters.

func NewFocalLength

func NewFocalLength(n, d uint32) FocalLength

NewFocalLength returns a new FocalLength by dividing "n" numerator and "d" demoninator

func (*FocalLength) DecodeMsg

func (z *FocalLength) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (FocalLength) EncodeMsg

func (z FocalLength) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (FocalLength) MarshalMsg

func (z FocalLength) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (FocalLength) MarshalText

func (fl FocalLength) MarshalText() (text []byte, err error)

MarshalText implements the TextMarshaler interface that is used by encoding/json

func (FocalLength) Msgsize

func (z FocalLength) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (FocalLength) String

func (fl FocalLength) String() string

func (*FocalLength) UnmarshalMsg

func (z *FocalLength) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (*FocalLength) UnmarshalText

func (fl *FocalLength) UnmarshalText(text []byte) (err error)

UnmarshalText implements the TextUnmarshaler interface that is used by encoding/json

type Metadata

type Metadata struct {
	// Exif Decode Function with ExifHeader
	ExifFn     DecodeFn
	ExifHeader ExifHeader

	// Xmp Decoding Function with XmpHeader
	XmpFn     DecodeFn
	XmpHeader XmpHeader

	// Dimenions of primary Image
	Dim Dimensions

	// Image Type
	It imagetype.ImageType
}

Metadata is common metadata among image parsers

func (Metadata) Dimensions

func (m Metadata) Dimensions() Dimensions

Dimensions returns the Dimensions of the Primary Image.

func (Metadata) ImageType

func (m Metadata) ImageType() imagetype.ImageType

ImageType returns the ImageType of the Primary Image.

type MeteringMode

type MeteringMode uint16

MeteringMode is the mode in which the image was metered.

const (
	MeteringModeUnknown MeteringMode = iota
	MeteringModeAverage
	MeteringModeCenterWeightedAverage
	MeteringModeSpot
	MeteringModeMultispot
	MeteringModeMultisegment
	MeteringModePartial
	MeteringModeOther MeteringMode = 255
)

Metering Modes

func NewMeteringMode

func NewMeteringMode(meteringMode uint16) MeteringMode

NewMeteringMode returns a MeteringMode from the given uint16

func (*MeteringMode) DecodeMsg

func (z *MeteringMode) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (MeteringMode) EncodeMsg

func (z MeteringMode) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (MeteringMode) MarshalJSON

func (mm MeteringMode) MarshalJSON() (buf []byte, err error)

MarshalJSON implements the JSONMarshaler interface that is used by encoding/json

func (MeteringMode) MarshalMsg

func (z MeteringMode) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (MeteringMode) MarshalText

func (mm MeteringMode) MarshalText() (text []byte, err error)

MarshalText implements the TextMarshaler interface

func (MeteringMode) Msgsize

func (z MeteringMode) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (MeteringMode) String

func (mm MeteringMode) String() string

String - Return Metering Mode as a string

Derived from https://sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html (23/09/2019)

func (*MeteringMode) UnmarshalJSON

func (mm *MeteringMode) UnmarshalJSON(buf []byte) error

UnmarshalJSON implements the JSONMarshaler interface that is used by encoding/json

func (*MeteringMode) UnmarshalMsg

func (z *MeteringMode) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (*MeteringMode) UnmarshalText

func (mm *MeteringMode) UnmarshalText(text []byte) (err error)

UnmarshalText implements the TextUnmarshaler interface that is used by encoding/json

type Orientation

type Orientation uint16

Orientation of an image

const (
	OrientationHorizontal                Orientation = 1
	OrientationMirrorHorizontal          Orientation = 2
	OrientationRotate180                 Orientation = 3
	OrientationMirrorVertical            Orientation = 4
	OrientationMirrorHorizontalRotate270 Orientation = 5
	OrientationRotate90                  Orientation = 6
	OrientationMirrorHorizontalRotate90  Orientation = 7
	OrientationRotate270                 Orientation = 8
)

Orientation values

func (*Orientation) DecodeMsg

func (z *Orientation) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (Orientation) EncodeMsg

func (z Orientation) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (Orientation) MarshalMsg

func (z Orientation) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (Orientation) Msgsize

func (z Orientation) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (Orientation) String

func (o Orientation) String() string

String returns an Orientation as a string

func (*Orientation) UnmarshalMsg

func (z *Orientation) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Reader

type Reader interface {
	io.Reader
	io.ReaderAt
	io.Seeker
}

Reader that is compatible with imagemeta

type UUID

type UUID [16]byte

UUID is a 128 bits Universally Unique Identifier (UUID). Based on github.com/satori/go.uuid

func UUIDFromBytes

func UUIDFromBytes(buf []byte) (UUID, error)

UUIDFromBytes returns UUID converted from raw byte slice input. It will return error if the slice isn't 16 bytes long.

func UUIDFromString

func UUIDFromString(str string) UUID

func (UUID) Bytes

func (u UUID) Bytes() []byte

Bytes returns bytes slice representation of UUID.

func (UUID) MarshalBinary

func (u UUID) MarshalBinary() (data []byte, err error)

MarshalBinary implements the encoding.BinaryMarshaler interface.

func (UUID) MarshalText

func (u UUID) MarshalText() (text []byte, err error)

MarshalText implements the TextMarshaler interface that is used by encoding/json

func (UUID) String

func (u UUID) String() string

String returns canonical string representation of UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

func (*UUID) UnmarshalBinary

func (u *UUID) UnmarshalBinary(data []byte) (err error)

UnmarshalBinary implements the encoding.BinaryUnmarshaler interface. It will return error if the slice isn't 16 bytes long.

func (*UUID) UnmarshalText

func (u *UUID) UnmarshalText(text []byte) (err error)

UnmarshalText implements the encoding.TextUnmarshaler interface. Following formats are supported:

"6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"{6ba7b810-9dad-11d1-80b4-00c04fd430c8}",
"urn:uuid:6ba7b810-9dad-11d1-80b4-00c04fd430c8"
"6ba7b8109dad11d180b400c04fd430c8"

ABNF for supported UUID text representation follows:

uuid := canonical | hashlike | braced | urn
plain := canonical | hashlike
canonical := 4hexoct '-' 2hexoct '-' 2hexoct '-' 6hexoct
hashlike := 12hexoct
braced := '{' plain '}'
urn := URN ':' UUID-NID ':' plain
URN := 'urn'
UUID-NID := 'uuid'
12hexoct := 6hexoct 6hexoct
6hexoct := 4hexoct 2hexoct
4hexoct := 2hexoct 2hexoct
2hexoct := hexoct hexoct
hexoct := hexdig hexdig
hexdig := '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' |
          'a' | 'b' | 'c' | 'd' | 'e' | 'f' |
          'A' | 'B' | 'C' | 'D' | 'E' | 'F'

type XmpHeader

type XmpHeader struct {
	Offset, Length uint32
}

XmpHeader is an XMP header of an image file. Contains Offset and Length of XMP metadata.

func NewXMPHeader

func NewXMPHeader(offset, length uint32) XmpHeader

NewXMPHeader returns a new xmp.Header with an offset and length of where to read XMP metadata.

Directories

Path Synopsis
Package canon provides data types and functions for representing Canon Camera Makernote values
Package canon provides data types and functions for representing Canon Camera Makernote values

Jump to

Keyboard shortcuts

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