mknote

package
v0.0.0-...-1f36970 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: BSD-2-Clause Imports: 6 Imported by: 1

Documentation

Overview

Package mknote provides makernote parsers that can be used with goexif/exif.

Index

Constants

View Source
const (
	CanonContinuousDrive int = 5
	CanonFocusMode       int = 7
	CanonRecordMode      int = 9
	CanonMeteringMode    int = 17
	CanonExposureMode    int = 20
	CanonLensType        int = 22
	CanonAESetting       int = 33
)

Canon Exif information constants

View Source
const (
	// common fields
	ISOSpeed                   exif.FieldName = "ISOSpeed"
	ColorMode                  exif.FieldName = "ColorMode"
	Quality                    exif.FieldName = "Quality"
	Sharpening                 exif.FieldName = "Sharpening"
	Focus                      exif.FieldName = "Focus"
	FlashSetting               exif.FieldName = "FlashSetting"
	FlashDevice                exif.FieldName = "FlashDevice"
	WhiteBalanceBias           exif.FieldName = "WhiteBalanceBias"
	WBRBLevels                 exif.FieldName = "WBRBLevels"
	ProgramShift               exif.FieldName = "ProgramShift"
	ExposureDiff               exif.FieldName = "ExposureDiff"
	ISOSelection               exif.FieldName = "ISOSelection"
	DataDump                   exif.FieldName = "DataDump"
	Preview                    exif.FieldName = "Preview"
	FlashComp                  exif.FieldName = "FlashComp"
	ISOSettings                exif.FieldName = "ISOSettings"
	ImageBoundary              exif.FieldName = "ImageBoundary"
	FlashExposureComp          exif.FieldName = "FlashExposureComp"
	FlashBracketComp           exif.FieldName = "FlashBracketComp"
	ExposureBracketComp        exif.FieldName = "ExposureBracketComp"
	ImageProcessing            exif.FieldName = "ImageProcessing"
	CropHiSpeed                exif.FieldName = "CropHiSpeed"
	ExposureTuning             exif.FieldName = "ExposureTuning"
	SerialNumber               exif.FieldName = "SerialNumber"
	ImageAuthentication        exif.FieldName = "ImageAuthentication"
	ActiveDLighting            exif.FieldName = "ActiveDLighting"
	VignetteControl            exif.FieldName = "VignetteControl"
	ImageAdjustment            exif.FieldName = "ImageAdjustment"
	ToneComp                   exif.FieldName = "ToneComp"
	AuxiliaryLens              exif.FieldName = "AuxiliaryLens"
	LensType                   exif.FieldName = "LensType"
	Lens                       exif.FieldName = "Lens"
	FocusDistance              exif.FieldName = "FocusDistance"
	DigitalZoom                exif.FieldName = "DigitalZoom"
	FlashMode                  exif.FieldName = "FlashMode"
	ShootingMode               exif.FieldName = "ShootingMode"
	AutoBracketRelease         exif.FieldName = "AutoBracketRelease"
	LensFStops                 exif.FieldName = "LensFStops"
	ContrastCurve              exif.FieldName = "ContrastCurve"
	ColorHue                   exif.FieldName = "ColorHue"
	SceneMode                  exif.FieldName = "SceneMode"
	HueAdjustment              exif.FieldName = "HueAdjustment"
	NEFCompression             exif.FieldName = "NEFCompression"
	NoiseReduction             exif.FieldName = "NoiseReduction"
	LinearizationTable         exif.FieldName = "LinearizationTable"
	RawImageCenter             exif.FieldName = "RawImageCenter"
	SensorPixelSize            exif.FieldName = "SensorPixelSize"
	SceneAssist                exif.FieldName = "SceneAssist"
	RetouchHistory             exif.FieldName = "RetouchHistory"
	ImageDataSize              exif.FieldName = "ImageDataSize"
	ImageCount                 exif.FieldName = "ImageCount"
	DeletedImageCount          exif.FieldName = "DeletedImageCount"
	ShutterCount               exif.FieldName = "ShutterCount"
	ImageOptimization          exif.FieldName = "ImageOptimization"
	SaturationText             exif.FieldName = "SaturationText"
	VariProgram                exif.FieldName = "VariProgram"
	ImageStabilization         exif.FieldName = "ImageStabilization"
	AFResponse                 exif.FieldName = "AFResponse"
	HighISONoiseReduction      exif.FieldName = "HighISONoiseReduction"
	ToningEffect               exif.FieldName = "ToningEffect"
	PrintIM                    exif.FieldName = "PrintIM"
	CaptureData                exif.FieldName = "CaptureData"
	CaptureVersion             exif.FieldName = "CaptureVersion"
	CaptureOffsets             exif.FieldName = "CaptureOffsets"
	ScanIFD                    exif.FieldName = "ScanIFD"
	ICCProfile                 exif.FieldName = "ICCProfile"
	CaptureOutput              exif.FieldName = "CaptureOutput"
	Panorama                   exif.FieldName = "Panorama"
	ImageType                  exif.FieldName = "ImageType"
	FirmwareVersion            exif.FieldName = "FirmwareVersion"
	FileNumber                 exif.FieldName = "FileNumber"
	OwnerName                  exif.FieldName = "OwnerName"
	CameraInfo                 exif.FieldName = "CameraInfo"
	CustomFunctions            exif.FieldName = "CustomFunctions"
	ModelID                    exif.FieldName = "ModelID"
	PictureInfo                exif.FieldName = "PictureInfo"
	ThumbnailImageValidArea    exif.FieldName = "ThumbnailImageValidArea"
	SerialNumberFormat         exif.FieldName = "SerialNumberFormat"
	SuperMacro                 exif.FieldName = "SuperMacro"
	OriginalDecisionDataOffset exif.FieldName = "OriginalDecisionDataOffset"
	WhiteBalanceTable          exif.FieldName = "WhiteBalanceTable"
	LensModel                  exif.FieldName = "LensModel"
	InternalSerialNumber       exif.FieldName = "InternalSerialNumber"
	DustRemovalData            exif.FieldName = "DustRemovalData"
	ProcessingInfo             exif.FieldName = "ProcessingInfo"
	MeasuredColor              exif.FieldName = "MeasuredColor"
	VRDOffset                  exif.FieldName = "VRDOffset"
	SensorInfo                 exif.FieldName = "SensorInfo"
	ColorData                  exif.FieldName = "ColorData"
)

Known Maker Note fields

View Source
const (
	NikonPreviewSubfileType exif.FieldName = "Nikon.Preview.SubfileType"
	NikonPreviewImageStart  exif.FieldName = "Nikon.Preview.ImageStart"
	NikonPreviewImageLength exif.FieldName = "Nikon.Preview.ImageLength"
	NikonPreviewCompression exif.FieldName = "Nikon.Preview.Compression"
)

Nikon NikonPreviewPtr Sub-IFD fields

Variables

View Source
var (
	CanonCameraSettings   exif.FieldName = "Canon.CameraSettings" // A sub-IFD
	CanonShotInfo         exif.FieldName = "Canon.ShotInfo"       // A sub-IFD
	CanonAFInfo           exif.FieldName = "Canon.AFInfo"
	CanonTimeInfo         exif.FieldName = "Canon.TimeInfo"
	CanonFileInfo         exif.FieldName = "Canon.FileInfo"
	CanonImageType        exif.FieldName = "Canon.ImageType"
	CanonPreviewImageInfo exif.FieldName = "Canon.PreviewImageInfo"
	CanonSerialNumber     exif.FieldName = "Canon.SerialNumber"
	Canon0x0000           exif.FieldName = "Canon.0x0000"
	Canon0x0003           exif.FieldName = "Canon.0x0003"
	Canon0x00b5           exif.FieldName = "Canon.0x00b5"
	Canon0x00c0           exif.FieldName = "Canon.0x00c0"
	Canon0x00c1           exif.FieldName = "Canon.0x00c1"
)

Canon-specific fields

View Source
var (
	SubIfd0PreviewImage = exif.NewPreviewImageTag(subIfdMap("SubIfd0", PreviewImageStart), subIfdMap("SubIfd0", PreviewImageLength), subIfdMap("SubIfd0", Compression))
	SubIfd1PreviewImage = exif.NewPreviewImageTag(subIfdMap("SubIfd1", PreviewImageStart), subIfdMap("SubIfd1", PreviewImageLength), subIfdMap("SubIfd1", Compression))
	SubIfd2JpegFromRaw  = exif.NewPreviewImageTag(subIfdMap("SubIfd2", JpgFromRawStart), subIfdMap("SubIfd2", JpgFromRawLength), subIfdMap("SubIfd2", Compression))
)

PreviewImageTags

View Source
var (
	SubfileType        exif.FieldName = "SubfileType"
	ImageWidth         exif.FieldName = "Width"
	ImageLength        exif.FieldName = "ImageLength"
	Compression        exif.FieldName = "Compression"
	JpgFromRawStart    exif.FieldName = "JpgFromRawStart"
	JpgFromRawLength   exif.FieldName = "JpgFromRawLength"
	PreviewImageStart  exif.FieldName = "PreviewImageStart"
	PreviewImageLength exif.FieldName = "PreviewImageLength"
	PreviewColorSpace  exif.FieldName = "PreviewColorSpace"
	PreviewDateTime    exif.FieldName = "PreviewDateTime"
)

SubIfd-specific fields

View Source
var (
	// Canon is an exif.Parser for canon makernote data.
	Canon = &canon{}
	// NikonV3 is an exif.Parser for nikon makernote data.
	NikonV3 = &nikonV3{}
	// AdobeDNG is an exif.Parse for DNG subIfds.
	AdobeDNG = &adobeDNG{}
	// All is a list of all available makernote parsers
	All = []exif.Parser{Canon, NikonV3, AdobeDNG}
)
View Source
var (
	NikonVersion        exif.FieldName = "Nikon.Version"
	NikonWhiteBalance   exif.FieldName = "Nikon.WhiteBalance"
	NikonColorSpace     exif.FieldName = "Nikon.ColorSpace"
	NikonLightSource    exif.FieldName = "Nikon.LightSource"
	NikonSaturation     exif.FieldName = "Nikon.Saturation"
	NikonShotInfo       exif.FieldName = "Nikon.ShotInfo"       // A sub-IFD
	NikonVRInfo         exif.FieldName = "Nikon.VRInfo"         // A sub-IFD
	NikonPictureControl exif.FieldName = "Nikon.PictureControl" // A sub-IFD
	NikonWorldTime      exif.FieldName = "Nikon.WorldTime"      // A sub-IFD
	NikonISOInfo        exif.FieldName = "Nikon.ISOInfo"        // A sub-IFD
	NikonAFInfo         exif.FieldName = "Nikon.AFInfo"         // A sub-IFD
	NikonColorBalance   exif.FieldName = "Nikon.ColorBalance"   // A sub-IFD
	NikonLensData       exif.FieldName = "Nikon.LensData"       // A sub-IFD
	NikonSerialNO       exif.FieldName = "Nikon.SerialNO"       // usually starts with "NO="
	NikonFlashInfo      exif.FieldName = "Nikon.FlashInfo"      // A sub-IFD
	NikonMultiExposure  exif.FieldName = "Nikon.MultiExposure"  // A sub-IFD
	NikonAFInfo2        exif.FieldName = "Nikon.AFInfo2"        // A sub-IFD
	NikonFileInfo       exif.FieldName = "Nikon.FileInfo"       // A sub-IFD
	NikonAFTune         exif.FieldName = "Nikon.AFTune"         // A sub-IFD
	NikonPreviewPtr     exif.FieldName = "Nikon.PreviewSubIFD"  // A sub-IFD
	Nikon3_0x000a       exif.FieldName = "Nikon3.0x000a"
	Nikon3_0x009b       exif.FieldName = "Nikon3.0x009b"
	Nikon3_0x009f       exif.FieldName = "Nikon3.0x009f"
	Nikon3_0x00a3       exif.FieldName = "Nikon3.0x00a3"
)

Nikon-specific Maker Note fields

CanonCameraSettingsFields -

NikonPreviewImageTag is the Preview Image Tag for NEF raw files

View Source
var SubIFD0Fields = map[uint16]exif.FieldName{
	0x00fe: subIfdMap("SubIfd0", SubfileType),
	0x0100: subIfdMap("SubIfd0", ImageWidth),
	0x0101: subIfdMap("SubIfd0", ImageLength),
	0x0103: subIfdMap("SubIfd0", Compression),
	0x0111: subIfdMap("SubIfd0", PreviewImageStart),
	0x0117: subIfdMap("SubIfd0", PreviewImageLength),
	0xc71a: subIfdMap("SubIfd0", PreviewColorSpace),
	0xc71b: subIfdMap("SubIfd0", PreviewDateTime),
}
View Source
var SubIFD1Fields = map[uint16]exif.FieldName{
	0x00fe: subIfdMap("SubIfd1", SubfileType),
	0x0100: subIfdMap("SubIfd1", ImageWidth),
	0x0101: subIfdMap("SubIfd1", ImageLength),
	0x0103: subIfdMap("SubIfd1", Compression),
	0x0111: subIfdMap("SubIfd1", PreviewImageStart),
	0x0117: subIfdMap("SubIfd1", PreviewImageLength),
	0xc71a: subIfdMap("SubIfd1", PreviewColorSpace),
	0xc71b: subIfdMap("SubIfd1", PreviewDateTime),
}
View Source
var SubIFD2Fields = map[uint16]exif.FieldName{
	0x00fe: subIfdMap("SubIfd2", SubfileType),
	0x0100: subIfdMap("SubIfd2", ImageWidth),
	0x0101: subIfdMap("SubIfd2", ImageLength),
	0x0103: subIfdMap("SubIfd2", Compression),
	0x0111: subIfdMap("SubIfd2", JpgFromRawStart),
	0x0117: subIfdMap("SubIfd2", JpgFromRawLength),
	0xc71a: subIfdMap("SubIfd2", PreviewColorSpace),
	0xc71b: subIfdMap("SubIfd2", PreviewDateTime),
}

Functions

This section is empty.

Types

type CameraSettings

type CameraSettings struct {
	RecordMode      string `json:"RecordMode"`
	FocusMode       string `json:"FocusMode"`
	ExposureMode    string `json:"ExposureMode"`
	ContinuousDrive string `json:"ContinuousDrive"`
	MeteringMode    string `json:"MeteringMode"`
	Lens            string `json:"Lens"`
}

CameraSettings -

type CameraSettingsField

type CameraSettingsField map[int]string

CameraSettingsField -

type CanonRaw

type CanonRaw struct {
	ModelID             string
	SerialNumber        string
	ImageType           string
	Timezone            string
	CanonShotInfo       canontags.CanonShotInfo `json:"CanonShotInfo"`
	CanonCameraSettings CameraSettings
	CanonAFInfo         canontags.CanonAFInfo
}

CanonRaw - Raw Image from a Canon Camera

func (*CanonRaw) Get

func (cr *CanonRaw) Get(x *exif.Exif) error

Get CanonRaw from exif

type NikonRaw

type NikonRaw struct{}

NikonRaw - Raw Image from a Canon Camera

func (*NikonRaw) RawCameraSettings

func (nr *NikonRaw) RawCameraSettings(x *exif.Exif) (CameraSettings, error)

RawCameraSettings -

type RawImage

type RawImage interface {
	RawCameraSettings(x *exif.Exif) (CameraSettings, error)
}

RawImage -

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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