canon

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: 2 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ev

func Ev(val int16) int16

Ev - ported from Phil Harvey's exiftool Updated May-10-2020 https://github.com/exiftool/exiftool/lib/Image/ExifTool/Canon.pm

func PointsInFocus

func PointsInFocus(af []uint16) (inFocus []int, selected []int, err error)

PointsInFocus returns AFPoints that are in focus and AFPoints that are selected

func TempConv

func TempConv(val uint16) int16

TempConv - ported from Phil Harvey's exiftool Updated May-10-2020 https://github.com/exiftool/exiftool/lib/Image/ExifTool/Canon.pm

Types

type AESetting

type AESetting int16

AESetting - Canon Makernote AutoExposure Setting

0: "Normal AE",
1: "Exposure Compensation",
2: "AE Lock",
3: "AE Lock + Exposure Compensation",
4: "No AE",

func (*AESetting) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (AESetting) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (AESetting) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (AESetting) Msgsize

func (z AESetting) Msgsize() (s int)

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

func (AESetting) String

func (ae AESetting) String() string

func (*AESetting) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type AFAreaMode

type AFAreaMode int16

AFAreaMode - Canon Autofocus Area Mode

0:  "Off (Manual Focus)",
1:  "AF Point Expansion (surround)",
2:  "Single-point AF",
4:  "Auto",
5:  "Face Detect AF",
6:  "Face + Tracking",
7:  "Zone AF",
8:  "AF Point Expansion (4 point)",
9:  "Spot AF",
10: "AF Point Expansion (8 point)",
11: "Flexizone Multi (49 point)",
12: "Flexizone Multi (9 point)",
13: "Flexizone Single",
14: "Large Zone AF",

func (*AFAreaMode) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (AFAreaMode) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (AFAreaMode) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (AFAreaMode) Msgsize

func (z AFAreaMode) Msgsize() (s int)

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

func (AFAreaMode) String

func (caf AFAreaMode) String() string

func (*AFAreaMode) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type AFInfo

type AFInfo struct {
	AFAreaMode    AFAreaMode
	NumAFPoints   uint16
	ValidAFPoints uint16
	AFPoints      []AFPoint
	InFocus       []int
	Selected      []int
}

AFInfo is Canon Makernote Autofocus Information

type AFPoint

type AFPoint [4]int16

AFPoint is an Auto Focus Point

func NewAFPoint

func NewAFPoint(w, h, x, y int16) AFPoint

NewAFPoint returns a new AFPoint from width, height, x-axis coord and y-axis coord

func ParseAFPoints

func ParseAFPoints(af []uint16) (afPoints []AFPoint)

ParseAFPoints returns []AFPoint

type BracketMode

type BracketMode int16

BracketMode - Canon Makernote Backet Mode

0: "Off",
1: "AEB",
2: "FEB",
3: "ISO",
4: "WB",

func (BracketMode) Active

func (bm BracketMode) Active() bool

Active - returns true if BracketMode is On

func (*BracketMode) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (BracketMode) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (BracketMode) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (BracketMode) Msgsize

func (z BracketMode) Msgsize() (s int)

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

func (BracketMode) String

func (bm BracketMode) String() string

func (*BracketMode) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type CameraSettings

type CameraSettings struct {
	Macromode         bool            // [1]
	SelfTimer         bool            // [2]
	ContinuousDrive   ContinuousDrive // [5]
	FocusMode         FocusMode       // [7]
	MeteringMode      MeteringMode    // [17]
	FocusRange        FocusRange      // [18]
	CanonExposureMode ExposureMode    // [20]
	//MaxFocalLength    int16           // [23]
	//MinFocalLength    int16           // [24]
	//FocalUnits        int16                       // [25]
	//FocusContinuous   CanonFocusContinous  // [32]
	//SpotMeteringMode  bool                        // [39]
	AESetting AESetting // [33]
}

CameraSettings is Canon Makernote Camera Settings TODO: Incomplete

type ContinuousDrive

type ContinuousDrive int16

ContinuousDrive is part of the CanonCameraSettings field

0:  "Single",
1:  "Continuous",
2:  "Movie",
3:  "Continuous, Speed Priority",
4:  "Continuous, Low",
5:  "Continuous, High",
6:  "Silent Single",
7:  "Unknown", // not defined
8:  "Unknown", // not defined
9:  "Single, Silent",
10: "Continuous, Silent",

func (*ContinuousDrive) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (ContinuousDrive) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (ContinuousDrive) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (ContinuousDrive) Msgsize

func (z ContinuousDrive) Msgsize() (s int)

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

func (ContinuousDrive) String

func (ccd ContinuousDrive) String() string

func (*ContinuousDrive) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ExposureMode

type ExposureMode int16

ExposureMode is part of the CanonCameraSettings field

0: "Easy",
1: "Program AE",
2: "Shutter speed priority AE",
3: "Aperture-priority AE",
4: "Manual",
5: "Depth-of-field AE",
6: "M-Dep",
7: "Bulb",
8: "Flexible-priority AE",

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) 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

func (*ExposureMode) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type FileInfo

type FileInfo struct {
	FocusDistance     FocusDistance // 20 	FocusDistanceUpper 	int16u // 21 	FocusDistanceLower 	int16u
	BracketMode       BracketMode   // 3 	BracketMode 	int16s
	BracketValue      int16         // 4 	BracketValue 	int16s
	BracketShotNumber int16         // 5 	BracketShotNumber 	int16s
	LiveViewShooting  bool          // 19 	LiveViewShooting 	int16s (bool)
}

FileInfo is Canon Makernote File Information

type FocusDistance

type FocusDistance [2]int16

FocusDistance -

func NewFocusDistance

func NewFocusDistance(upper, lower uint16) FocusDistance

NewFocusDistance creates a new FocusDistance with the upper and lower limits

func (*FocusDistance) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*FocusDistance) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*FocusDistance) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*FocusDistance) Msgsize

func (z *FocusDistance) Msgsize() (s int)

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

func (*FocusDistance) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type FocusMode

type FocusMode int16

FocusMode is part of the CanonCameraSettings field

0:   "One-shot AF",
1:   "AI Servo AF",
2:   "AI Focus AF",
3:   "Manual Focus",
4:   "Single",
5:   "Continuous",
6:   "Manual Focus",
16:  "Pan Focus",
256: "AF + MF",
512: "Movie Snap Focus",
519: "Movie Servo AF",

func (*FocusMode) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (FocusMode) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (FocusMode) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (FocusMode) Msgsize

func (z FocusMode) Msgsize() (s int)

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

func (FocusMode) String

func (fm FocusMode) String() string

func (*FocusMode) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type FocusRange

type FocusRange int16

FocusRange is part of the CanonCameraSettings field

0:  "Manual",
1:  "Auto",
2:  "Not Known",
3:  "Macro",
4:  "Very Close",
5:  "Close",
6:  "Middle Range",
7:  "Far Range",
8:  "Pan Focus",
9:  "Super Macro",
10: "Infinity",

func (*FocusRange) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (FocusRange) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (FocusRange) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (FocusRange) Msgsize

func (z FocusRange) Msgsize() (s int)

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

func (FocusRange) String

func (fr FocusRange) String() string

func (*FocusRange) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type MeteringMode

type MeteringMode int16

MeteringMode is part of the CanonCameraSettings field

0: "Default",
1: "Spot",
2: "Average",
3: "Evaluative",
4: "Partial",
5: "Center-weighted average",

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) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

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

func (*MeteringMode) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ShotInfo

type ShotInfo struct {
	CameraTemperature      int16         // [12] 	CameraTemperature 	int16s 	(newer EOS models only)
	FlashExposureComp      int16         // [15] 	FlashExposureComp 	int16s
	AutoExposureBracketing int16         // [16] 	AutoExposureBracketing 	int16s
	AEBBracketValue        int16         // [17] 	AEBBracketValue 	int16s
	SelfTimer              int16         // 29 	SelfTimer2 	int16s
	FocusDistance          FocusDistance // 19 	FocusDistanceUpper 	int16u // 20 	FocusDistanceLower 	int16u
}

ShotInfo is Canon Makernote Shot Information TODO: Incomplete

Jump to

Keyboard shortcuts

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