Documentation ¶
Index ¶
- Constants
- Variables
- func NewTagMap() exif.TagMap
- type CanonAFInfo
- type CanonCameraSettings
- type CanonFileInfo
- type CanonShotInfo
- type ExifResults
- func (itm ExifResults) AddTag(tag exif.Tag, ifdIndex int8, fqIfdPath string, tagID exif.TagID)
- func (res ExifResults) Aperture() (float32, error)
- func (res ExifResults) Artist() (artist string, err error)
- func (res ExifResults) CameraMake() (make string, err error)
- func (res ExifResults) CameraModel() (model string, err error)
- func (res ExifResults) CameraSerial() (serial string, err error)
- func (res ExifResults) CanonAFInfo() (afInfo CanonAFInfo, err error)
- func (res ExifResults) CanonCameraSettings() (CanonCameraSettings, error)
- func (res ExifResults) CanonFileInfo() (CanonFileInfo, error)
- func (res ExifResults) CanonShotInfo() (CanonShotInfo, error)
- func (res ExifResults) Copyright() (copyright string, err error)
- func (res ExifResults) DateTime() (time.Time, error)
- func (res ExifResults) Dimensions() (width, height int, err error)
- func (res ExifResults) ExposureBiasValue() (string, error)
- func (res ExifResults) ExposureProgram() (ExposureMode, error)
- func (res ExifResults) Flash() (FlashMode, error)
- func (res ExifResults) FocalLength() (FocalLength, error)
- func (res ExifResults) FocalLengthIn35mmFilm() (FocalLength, error)
- func (res ExifResults) GPSAltitude() (alt float32, err error)
- func (res ExifResults) GPSInfo() (lat, lng float64, err error)
- func (res ExifResults) GPSTime() (timestamp time.Time, err error)
- func (itm ExifResults) GetIfd(fqIfdPath string) []exif.TagMap
- func (itm ExifResults) GetTag(fqIfdPath string, ifdIndex int8, tagID exif.TagID) exif.Tag
- func (res ExifResults) ISOSpeed() (int, error)
- func (res ExifResults) LensMake() (make string, err error)
- func (res ExifResults) LensModel() (model string, err error)
- func (res ExifResults) LensSerial() (serial string, err error)
- func (res ExifResults) MeteringMode() (MeteringMode, error)
- func (res ExifResults) ModifyDate() (time.Time, error)
- func (res ExifResults) Orientation() (string, error)
- func (res ExifResults) ShutterSpeed() (ShutterSpeed, error)
- func (itm ExifResults) String() string
- func (res ExifResults) Thumbnail() (int, int, error)
- func (res ExifResults) XMLPacket() (str string, err error)
- type ExposureBias
- type ExposureMode
- type FlashMode
- type FocalLength
- type GpsInfo
- type MeteringMode
- type ShutterSpeed
Constants ¶
const (
// GPSIfd "IFD/GPS"
GPSIfdString = "IFD/GPS"
)
GPS API constants
Variables ¶
var ( ErrEmptyTag = errors.New("Error empty tag") ErrParseTag = fmt.Errorf("Error parsing tag") ErrTagType = errors.New("Error wrong tag Type") )
API Errors
var ( // ErrGpsCoordsNotValid means that some part of the geographic data were unparseable. ErrGpsCoordsNotValid = errors.New("GPS coordinates not valid") // ErrGPSRationalNotValid means that the rawCoordinates were not long enough. ErrGPSRationalNotValid = errors.New("GPS Coords requires a raw-coordinate with exactly three rationals") )
var ( ErrParseYear = fmt.Errorf("Error parsing Year") ErrParseMonth = fmt.Errorf("Error parsing Month") ErrParseDay = fmt.Errorf("Error parsing Day") ErrParseHour = fmt.Errorf("Error parsing Hour") ErrParseMin = fmt.Errorf("Error parsing Min") )
Errors for Parsing of Time
Functions ¶
Types ¶
type CanonAFInfo ¶
type CanonAFInfo struct { AFAreaMode ifdmknote.CanonAFAreaMode NumAFPoints uint16 ValidAFPoints uint16 AFPoints []ifdmknote.AFPoint InFocus []int Selected []int }
CanonAFInfo - Canon Makernote Autofocus Information
type CanonCameraSettings ¶
type CanonCameraSettings struct { Macromode bool // [1] SelfTimer bool // [2] ContinuousDrive ifdmknote.CanonContinuousDrive // [5] FocusMode ifdmknote.CanonFocusMode // [7] MeteringMode ifdmknote.CanonMeteringMode // [17] FocusRange ifdmknote.CanonFocusRange // [18] CanonExposureMode ifdmknote.CanonExposureMode // [20] MaxFocalLength int16 // [23] MinFocalLength int16 // [24] //FocalUnits int16 // [25] //FocusContinuous ifdmknote.CanonFocusContinous // [32] //SpotMeteringMode bool // [39] AESetting ifdmknote.CanonAESetting // [33] }
CanonCameraSettings - Canon Makernote Camera Settings Incomplete
type CanonFileInfo ¶
type CanonFileInfo struct { FocusDistance ifdmknote.FocusDistance // 20 FocusDistanceUpper int16u // 21 FocusDistanceLower int16u BracketMode ifdmknote.CanonBracketMode // 3 BracketMode int16s BracketValue int16 // 4 BracketValue int16s BracketShotNumber int16 // 5 BracketShotNumber int16s LiveViewShooting bool // 19 LiveViewShooting int16s (bool) }
CanonFileInfo - Canon Makernote File Information
type CanonShotInfo ¶
type CanonShotInfo 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 }
CanonShotInfo - Canon Makernote Shot Information WIP / Incomplete
type ExifResults ¶
type ExifResults struct {
// contains filtered or unexported fields
}
ExifResults contains an exifReader, the tags and offsets for parsing the values from the exifReader
func NewExifResults ¶
func NewExifResults(er *exiftool.ExifReader) ExifResults
NewExifResults creates a new ExifResults with an active ExifReader. The ByteOrder is taken from the ExifReader
func (ExifResults) Aperture ¶
func (res ExifResults) Aperture() (float32, error)
Aperture convenience func. "IFD/Exif" FNumber
func (ExifResults) Artist ¶
func (res ExifResults) Artist() (artist string, err error)
Artist convenience func. "IFD" Artist
func (ExifResults) CameraMake ¶
func (res ExifResults) CameraMake() (make string, err error)
CameraMake convenience func. "IFD" Make
func (ExifResults) CameraModel ¶
func (res ExifResults) CameraModel() (model string, err error)
CameraModel convenience func. "IFD" Model
func (ExifResults) CameraSerial ¶
func (res ExifResults) CameraSerial() (serial string, err error)
CameraSerial convenience func. "IFD/Exif" BodySerialNumber
func (ExifResults) CanonAFInfo ¶
func (res ExifResults) CanonAFInfo() (afInfo CanonAFInfo, err error)
CanonAFInfo - Canon Camera AutoFocus Information from the Makernote
func (ExifResults) CanonCameraSettings ¶
func (res ExifResults) CanonCameraSettings() (CanonCameraSettings, error)
CanonCameraSettings convenience func. "IFD/Exif/Makernotes.Canon" CanonCameraSettings Canon Camera Settings from the Makernote
func (ExifResults) CanonFileInfo ¶
func (res ExifResults) CanonFileInfo() (CanonFileInfo, error)
CanonFileInfo convenience func. "IFD/Exif/Makernotes.Canon" CanonFileInfo Canon Camera File Info from the Makernote
func (ExifResults) CanonShotInfo ¶
func (res ExifResults) CanonShotInfo() (CanonShotInfo, error)
CanonShotInfo convenience func. "IFD/Exif/Makernotes.Canon" CanonShotInfo Canon Camera Shot Info from the Makernote
func (ExifResults) Copyright ¶
func (res ExifResults) Copyright() (copyright string, err error)
Copyright convenience func. "IFD" Copyright
func (ExifResults) DateTime ¶
func (res ExifResults) DateTime() (time.Time, error)
DateTime - the date and time at which the EXIF file was created with sub-second precision
func (ExifResults) Dimensions ¶
func (res ExifResults) Dimensions() (width, height int, err error)
Dimensions convenience func. "IFD" Dimensions
func (ExifResults) ExposureBiasValue ¶
func (res ExifResults) ExposureBiasValue() (string, error)
ExposureBiasValue convenience func. "IFD/Exif" ExposureBiasValue WIP
func (ExifResults) ExposureProgram ¶
func (res ExifResults) ExposureProgram() (ExposureMode, error)
ExposureProgram convenience func. "IFD/Exif" ExposureProgram
func (ExifResults) Flash ¶
func (res ExifResults) Flash() (FlashMode, error)
Flash convenience func. "IFD/Exif" Flash
func (ExifResults) FocalLength ¶
func (res ExifResults) FocalLength() (FocalLength, error)
FocalLength convenience func. "IFD/Exif" FocalLength Lens Focal Length in mm
func (ExifResults) FocalLengthIn35mmFilm ¶
func (res ExifResults) FocalLengthIn35mmFilm() (FocalLength, error)
FocalLengthIn35mmFilm convenience func. "IFD/Exif" FocalLengthIn35mmFilm Lens Focal Length Equivalent for 35mm sensor in mm
func (ExifResults) GPSAltitude ¶
func (res ExifResults) GPSAltitude() (alt float32, err error)
GPSAltitude convenience func. "IFD/GPS" GPSAltitude WIP
func (ExifResults) GPSInfo ¶
func (res ExifResults) GPSInfo() (lat, lng float64, err error)
GPSInfo convenience func. "IFD/GPS" GPSLatitude and GPSLongitude
func (ExifResults) GPSTime ¶
func (res ExifResults) GPSTime() (timestamp time.Time, err error)
GPSTime convenience func. "IFD/GPS" GPSDateStamp and GPSTimeStamp
func (ExifResults) GetIfd ¶
func (itm ExifResults) GetIfd(fqIfdPath string) []exif.TagMap
GetIfd returns an Ifd of Tags from the ExifResults
func (ExifResults) ISOSpeed ¶
func (res ExifResults) ISOSpeed() (int, error)
ISOSpeed convenience func. "IFD/Exif" ISOSpeed
func (ExifResults) LensMake ¶
func (res ExifResults) LensMake() (make string, err error)
LensMake convenience func. "IFD/Exif" LensMake
func (ExifResults) LensModel ¶
func (res ExifResults) LensModel() (model string, err error)
LensModel convenience func. "IFD/Exif" LensModel
func (ExifResults) LensSerial ¶
func (res ExifResults) LensSerial() (serial string, err error)
LensSerial convenience func. "IFD/Exif" LensSerialNumber
func (ExifResults) MeteringMode ¶
func (res ExifResults) MeteringMode() (MeteringMode, error)
MeteringMode convenience func. "IFD/Exif" MeteringMode
func (ExifResults) ModifyDate ¶
func (res ExifResults) ModifyDate() (time.Time, error)
ModifyDate - the date and time at which the Exif file was modified
func (ExifResults) Orientation ¶
func (res ExifResults) Orientation() (string, error)
Orientation convenience func. "IFD" Orientation WIP
func (ExifResults) ShutterSpeed ¶
func (res ExifResults) ShutterSpeed() (ShutterSpeed, error)
ShutterSpeed convenience func. "IFD/Exif" ExposureTime
func (ExifResults) String ¶
func (itm ExifResults) String() string
func (ExifResults) Thumbnail ¶
func (res ExifResults) Thumbnail() (int, int, error)
Thumbnail convenience func. "IFD0" StripOffsets and StripByteCounts WIP Errors with NEF images
func (ExifResults) XMLPacket ¶
func (res ExifResults) XMLPacket() (str string, err error)
XMLPacket convenience func. "IFD" XMLPacket WIP
type ExposureBias ¶
type ExposureBias [2]int64
ExposureBias - [0] Numerator [1] Denominator
func (ExposureBias) MarshalJSON ¶
func (eb ExposureBias) MarshalJSON() ([]byte, error)
MarshalJSON - Custom Marshall JSON
func (ExposureBias) String ¶
func (eb ExposureBias) String() string
String - String value of Exposure Bias
type ExposureMode ¶
type ExposureMode uint8
ExposureMode - Mode in which the Exposure was taken.
func (ExposureMode) String ¶
func (em ExposureMode) String() string
String - Return Exposure Mode as a string
type FlashMode ¶
type FlashMode uint8
FlashMode - Mode in which a Flash was used. (uint8) - value of FlashMode
type FocalLength ¶
type FocalLength float32
FocalLength - Focal Length in which the image was captured
func (FocalLength) String ¶
func (fl FocalLength) String() string
type GpsInfo ¶
GpsInfo encapsulates all of the geographic information in one place.
type MeteringMode ¶
type MeteringMode uint8
MeteringMode - Mode in which the image was metered.
func (MeteringMode) String ¶
func (mm MeteringMode) String() string
String - Return Metering Mode as a string
type ShutterSpeed ¶
type ShutterSpeed [2]int
ShutterSpeed - [0] Numerator [1] Denominator
func (ShutterSpeed) MarshalJSON ¶
func (ss ShutterSpeed) MarshalJSON() ([]byte, error)
MarshalJSON - Custom Marshall JSON
func (ShutterSpeed) String ¶
func (ss ShutterSpeed) String() string
String - return a ShutterSpeed as a string