Documentation ¶
Overview ¶
Package meta contains meta types for image metadata
Index ¶
- Variables
- func BinaryOrder(buf []byte) binary.ByteOrder
- func CleanXMPSuffixWhiteSpace(buf []byte) []byte
- type Aperture
- func (z *Aperture) DecodeMsg(dc *msgp.Reader) (err error)
- func (z Aperture) EncodeMsg(en *msgp.Writer) (err error)
- func (z Aperture) MarshalMsg(b []byte) (o []byte, err error)
- func (aa Aperture) MarshalText() (text []byte, err error)
- func (z Aperture) Msgsize() (s int)
- func (aa *Aperture) ParseString(buf []byte) error
- func (aa Aperture) String() string
- func (z *Aperture) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (aa *Aperture) UnmarshalText(text []byte) (err error)
- type DecodeFn
- type Dimensions
- func (d Dimensions) AspectRatio() float32
- func (z *Dimensions) DecodeMsg(dc *msgp.Reader) (err error)
- func (z Dimensions) EncodeMsg(en *msgp.Writer) (err error)
- func (z Dimensions) MarshalMsg(b []byte) (o []byte, err error)
- func (z Dimensions) Msgsize() (s int)
- func (d Dimensions) Orientation() uint
- func (d Dimensions) Size() (width, height uint32)
- func (d Dimensions) String() string
- func (z *Dimensions) UnmarshalMsg(bts []byte) (o []byte, err error)
- type ExifHeader
- type ExposureBias
- func (z *ExposureBias) DecodeMsg(dc *msgp.Reader) (err error)
- func (z ExposureBias) EncodeMsg(en *msgp.Writer) (err error)
- func (z ExposureBias) MarshalMsg(b []byte) (o []byte, err error)
- func (eb ExposureBias) MarshalText() (text []byte, err error)
- func (z ExposureBias) Msgsize() (s int)
- func (eb ExposureBias) String() string
- func (z *ExposureBias) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (eb *ExposureBias) UnmarshalText(text []byte) (err error)
- type ExposureMode
- func (z *ExposureMode) DecodeMsg(dc *msgp.Reader) (err error)
- func (z ExposureMode) EncodeMsg(en *msgp.Writer) (err error)
- func (z ExposureMode) MarshalMsg(b []byte) (o []byte, err error)
- func (em ExposureMode) MarshalText() (text []byte, err error)
- func (z ExposureMode) Msgsize() (s int)
- func (em ExposureMode) String() string
- func (z *ExposureMode) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (em *ExposureMode) UnmarshalText(text []byte) (err error)
- type ExposureProgram
- func (z *ExposureProgram) DecodeMsg(dc *msgp.Reader) (err error)
- func (z ExposureProgram) EncodeMsg(en *msgp.Writer) (err error)
- func (z ExposureProgram) MarshalMsg(b []byte) (o []byte, err error)
- func (ep ExposureProgram) MarshalText() (text []byte, err error)
- func (z ExposureProgram) Msgsize() (s int)
- func (ep ExposureProgram) String() string
- func (z *ExposureProgram) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (ep *ExposureProgram) UnmarshalText(text []byte) (err error)
- type Flash
- func (z *Flash) DecodeMsg(dc *msgp.Reader) (err error)
- func (z Flash) EncodeMsg(en *msgp.Writer) (err error)
- func (f Flash) Fired() bool
- func (f Flash) FlashFunction() bool
- func (z Flash) MarshalMsg(b []byte) (o []byte, err error)
- func (f Flash) Mode() FlashMode
- func (z Flash) Msgsize() (s int)
- func (f Flash) Redeye() bool
- func (f Flash) ReturnStatus() FlashMode
- func (f Flash) String() string
- func (z *Flash) UnmarshalMsg(bts []byte) (o []byte, err error)
- type FlashMode
- type FocalLength
- func (z *FocalLength) DecodeMsg(dc *msgp.Reader) (err error)
- func (z FocalLength) EncodeMsg(en *msgp.Writer) (err error)
- func (z FocalLength) MarshalMsg(b []byte) (o []byte, err error)
- func (fl FocalLength) MarshalText() (text []byte, err error)
- func (z FocalLength) Msgsize() (s int)
- func (fl FocalLength) String() string
- func (z *FocalLength) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (fl *FocalLength) UnmarshalText(text []byte) (err error)
- type Metadata
- type MeteringMode
- func (z *MeteringMode) DecodeMsg(dc *msgp.Reader) (err error)
- func (z MeteringMode) EncodeMsg(en *msgp.Writer) (err error)
- func (mm MeteringMode) MarshalJSON() (buf []byte, err error)
- func (z MeteringMode) MarshalMsg(b []byte) (o []byte, err error)
- func (mm MeteringMode) MarshalText() (text []byte, err error)
- func (z MeteringMode) Msgsize() (s int)
- func (mm MeteringMode) String() string
- func (mm *MeteringMode) UnmarshalJSON(buf []byte) error
- func (z *MeteringMode) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (mm *MeteringMode) UnmarshalText(text []byte) (err error)
- type Orientation
- func (z *Orientation) DecodeMsg(dc *msgp.Reader) (err error)
- func (z Orientation) EncodeMsg(en *msgp.Writer) (err error)
- func (z Orientation) MarshalMsg(b []byte) (o []byte, err error)
- func (z Orientation) Msgsize() (s int)
- func (o Orientation) String() string
- func (z *Orientation) UnmarshalMsg(bts []byte) (o []byte, err error)
- type Reader
- type ShutterSpeed
- func (z *ShutterSpeed) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *ShutterSpeed) EncodeMsg(en *msgp.Writer) (err error)
- func (z *ShutterSpeed) MarshalMsg(b []byte) (o []byte, err error)
- func (ss ShutterSpeed) MarshalText() (text []byte, err error)
- func (z *ShutterSpeed) Msgsize() (s int)
- func (ss ShutterSpeed) String() string
- func (z *ShutterSpeed) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (ss *ShutterSpeed) UnmarshalText(text []byte) (err error)
- type UUID
- type XmpHeader
Constants ¶
This section is empty.
Variables ¶
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
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.
var NilUUID = UUID{}
NilUUID is special form of UUID that is specified to have all 128 bits set to zero.
Functions ¶
func BinaryOrder ¶
BinaryOrder returns the binary.ByteOrder for a Tiff Header based on 4 bytes from the buf.
Good reference: CIPA DC-008-2016; JEITA CP-3451D -> http://www.cipa.jp/std/documents/e/DC-008-Translation-2016-E.pdf
func CleanXMPSuffixWhiteSpace ¶
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 ¶
NewAperture returns a new Aperture by dividing the "n" numerator over the "d" demoninator
func (Aperture) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (Aperture) MarshalText ¶
MarshalText implements the TextMarshaler interface that is used by encoding/json
func (Aperture) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*Aperture) ParseString ¶
ParseString parses a string for an aperture value. ex: 1/100 or 300/100
func (*Aperture) UnmarshalMsg ¶
UnmarshalMsg implements msgp.Unmarshaler
func (*Aperture) UnmarshalText ¶
UnmarshalText implements the TextUnmarshaler interface that is used by encoding/json.
type DecodeFn ¶
DecodeFn is a function for decoding Metadata.
For Exif Metadata use ExifHeader and ExifFn.
For Xmp Metadata use XmpHeader and XmpFn.
type Dimensions ¶
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) 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 { ByteOrder binary.ByteOrder FirstIfdOffset uint32 TiffHeaderOffset uint32 ExifLength uint32 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 binary.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) 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 uint8
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 uint8
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 Flash ¶
type Flash uint8
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)
func (Flash) FlashFunction ¶
FlashFunction is bit 5, returns true if flash function was not present
func (Flash) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (Flash) Mode ¶
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 ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (Flash) ReturnStatus ¶
ReturnStatus is bits 1 and 2, returns 4 if "No Return" present and 6 if "Return" present.
FlashNoReturn: 4 FlashReturn: 6
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) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
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.
type MeteringMode ¶
type MeteringMode uint8
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 uint8) MeteringMode
NewMeteringMode returns a MeteringMode from the given uint8
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 uint8
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 ShutterSpeed ¶
type ShutterSpeed [2]uint32
ShutterSpeed contains the shutter speed in seconds. Limit to 1/2 and 1/3 stops [0] Numerator [1] Denominator
func NewShutterSpeed ¶
func NewShutterSpeed(n uint32, d uint32) ShutterSpeed
NewShutterSpeed creates a new ShutterSpeed with "n" as numerator and "d" as denominator
func (*ShutterSpeed) DecodeMsg ¶
func (z *ShutterSpeed) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*ShutterSpeed) EncodeMsg ¶
func (z *ShutterSpeed) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*ShutterSpeed) MarshalMsg ¶
func (z *ShutterSpeed) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (ShutterSpeed) MarshalText ¶
func (ss ShutterSpeed) MarshalText() (text []byte, err error)
MarshalText implements the TextMarshaler interface that is used by encoding/json
func (*ShutterSpeed) Msgsize ¶
func (z *ShutterSpeed) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (ShutterSpeed) String ¶
func (ss ShutterSpeed) String() string
String returns a ShutterSpeed as a string
func (*ShutterSpeed) UnmarshalMsg ¶
func (z *ShutterSpeed) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
func (*ShutterSpeed) UnmarshalText ¶
func (ss *ShutterSpeed) UnmarshalText(text []byte) (err error)
UnmarshalText implements the TextUnmarshaler interface that is used by encoding/json
type UUID ¶
type UUID [16]byte
UUID is a 128 bits Universally Unique Identifier (UUID). Based on github.com/satori/go.uuid
func UUIDFromBytes ¶
UUIDFromBytes returns UUID converted from raw byte slice input. It will return error if the slice isn't 16 bytes long.
func UUIDFromString ¶
func (UUID) MarshalBinary ¶
MarshalBinary implements the encoding.BinaryMarshaler interface.
func (UUID) MarshalText ¶
MarshalText implements the TextMarshaler interface that is used by encoding/json
func (UUID) String ¶
String returns canonical string representation of UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
func (*UUID) UnmarshalBinary ¶
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface. It will return error if the slice isn't 16 bytes long.
func (*UUID) UnmarshalText ¶
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 ¶
NewXMPHeader returns a new xmp.Header with an offset and length of where to read XMP metadata.