1package mknote 2 3import "github.com/rwcarlsen/goexif/exif" 4 5// Useful resources used in creating these tables: 6// http://www.exiv2.org/makernote.html 7// http://www.exiv2.org/tags-canon.html 8// http://www.exiv2.org/tags-nikon.html 9 10// Known Maker Note fields 11const ( 12 // common fields 13 ISOSpeed exif.FieldName = "ISOSpeed" 14 ColorMode exif.FieldName = "ColorMode" 15 Quality exif.FieldName = "Quality" 16 Sharpening exif.FieldName = "Sharpening" 17 Focus exif.FieldName = "Focus" 18 FlashSetting exif.FieldName = "FlashSetting" 19 FlashDevice exif.FieldName = "FlashDevice" 20 WhiteBalanceBias exif.FieldName = "WhiteBalanceBias" 21 WB_RBLevels exif.FieldName = "WB_RBLevels" 22 ProgramShift exif.FieldName = "ProgramShift" 23 ExposureDiff exif.FieldName = "ExposureDiff" 24 ISOSelection exif.FieldName = "ISOSelection" 25 DataDump exif.FieldName = "DataDump" 26 Preview exif.FieldName = "Preview" 27 FlashComp exif.FieldName = "FlashComp" 28 ISOSettings exif.FieldName = "ISOSettings" 29 ImageBoundary exif.FieldName = "ImageBoundary" 30 FlashExposureComp exif.FieldName = "FlashExposureComp" 31 FlashBracketComp exif.FieldName = "FlashBracketComp" 32 ExposureBracketComp exif.FieldName = "ExposureBracketComp" 33 ImageProcessing exif.FieldName = "ImageProcessing" 34 CropHiSpeed exif.FieldName = "CropHiSpeed" 35 ExposureTuning exif.FieldName = "ExposureTuning" 36 SerialNumber exif.FieldName = "SerialNumber" 37 ImageAuthentication exif.FieldName = "ImageAuthentication" 38 ActiveDLighting exif.FieldName = "ActiveDLighting" 39 VignetteControl exif.FieldName = "VignetteControl" 40 ImageAdjustment exif.FieldName = "ImageAdjustment" 41 ToneComp exif.FieldName = "ToneComp" 42 AuxiliaryLens exif.FieldName = "AuxiliaryLens" 43 LensType exif.FieldName = "LensType" 44 Lens exif.FieldName = "Lens" 45 FocusDistance exif.FieldName = "FocusDistance" 46 DigitalZoom exif.FieldName = "DigitalZoom" 47 FlashMode exif.FieldName = "FlashMode" 48 ShootingMode exif.FieldName = "ShootingMode" 49 AutoBracketRelease exif.FieldName = "AutoBracketRelease" 50 LensFStops exif.FieldName = "LensFStops" 51 ContrastCurve exif.FieldName = "ContrastCurve" 52 ColorHue exif.FieldName = "ColorHue" 53 SceneMode exif.FieldName = "SceneMode" 54 HueAdjustment exif.FieldName = "HueAdjustment" 55 NEFCompression exif.FieldName = "NEFCompression" 56 NoiseReduction exif.FieldName = "NoiseReduction" 57 LinearizationTable exif.FieldName = "LinearizationTable" 58 RawImageCenter exif.FieldName = "RawImageCenter" 59 SensorPixelSize exif.FieldName = "SensorPixelSize" 60 SceneAssist exif.FieldName = "SceneAssist" 61 RetouchHistory exif.FieldName = "RetouchHistory" 62 ImageDataSize exif.FieldName = "ImageDataSize" 63 ImageCount exif.FieldName = "ImageCount" 64 DeletedImageCount exif.FieldName = "DeletedImageCount" 65 ShutterCount exif.FieldName = "ShutterCount" 66 ImageOptimization exif.FieldName = "ImageOptimization" 67 SaturationText exif.FieldName = "SaturationText" 68 VariProgram exif.FieldName = "VariProgram" 69 ImageStabilization exif.FieldName = "ImageStabilization" 70 AFResponse exif.FieldName = "AFResponse" 71 HighISONoiseReduction exif.FieldName = "HighISONoiseReduction" 72 ToningEffect exif.FieldName = "ToningEffect" 73 PrintIM exif.FieldName = "PrintIM" 74 CaptureData exif.FieldName = "CaptureData" 75 CaptureVersion exif.FieldName = "CaptureVersion" 76 CaptureOffsets exif.FieldName = "CaptureOffsets" 77 ScanIFD exif.FieldName = "ScanIFD" 78 ICCProfile exif.FieldName = "ICCProfile" 79 CaptureOutput exif.FieldName = "CaptureOutput" 80 Panorama exif.FieldName = "Panorama" 81 ImageType exif.FieldName = "ImageType" 82 FirmwareVersion exif.FieldName = "FirmwareVersion" 83 FileNumber exif.FieldName = "FileNumber" 84 OwnerName exif.FieldName = "OwnerName" 85 CameraInfo exif.FieldName = "CameraInfo" 86 CustomFunctions exif.FieldName = "CustomFunctions" 87 ModelID exif.FieldName = "ModelID" 88 PictureInfo exif.FieldName = "PictureInfo" 89 ThumbnailImageValidArea exif.FieldName = "ThumbnailImageValidArea" 90 SerialNumberFormat exif.FieldName = "SerialNumberFormat" 91 SuperMacro exif.FieldName = "SuperMacro" 92 OriginalDecisionDataOffset exif.FieldName = "OriginalDecisionDataOffset" 93 WhiteBalanceTable exif.FieldName = "WhiteBalanceTable" 94 LensModel exif.FieldName = "LensModel" 95 InternalSerialNumber exif.FieldName = "InternalSerialNumber" 96 DustRemovalData exif.FieldName = "DustRemovalData" 97 ProcessingInfo exif.FieldName = "ProcessingInfo" 98 MeasuredColor exif.FieldName = "MeasuredColor" 99 VRDOffset exif.FieldName = "VRDOffset" 100 SensorInfo exif.FieldName = "SensorInfo" 101 ColorData exif.FieldName = "ColorData" 102 103 // Nikon-specific fields 104 Nikon_Version exif.FieldName = "Nikon.Version" 105 Nikon_WhiteBalance exif.FieldName = "Nikon.WhiteBalance" 106 Nikon_ColorSpace exif.FieldName = "Nikon.ColorSpace" 107 Nikon_LightSource exif.FieldName = "Nikon.LightSource" 108 Nikon_Saturation exif.FieldName = "Nikon_Saturation" 109 Nikon_ShotInfo exif.FieldName = "Nikon.ShotInfo" // A sub-IFD 110 Nikon_VRInfo exif.FieldName = "Nikon.VRInfo" // A sub-IFD 111 Nikon_PictureControl exif.FieldName = "Nikon.PictureControl" // A sub-IFD 112 Nikon_WorldTime exif.FieldName = "Nikon.WorldTime" // A sub-IFD 113 Nikon_ISOInfo exif.FieldName = "Nikon.ISOInfo" // A sub-IFD 114 Nikon_AFInfo exif.FieldName = "Nikon.AFInfo" // A sub-IFD 115 Nikon_ColorBalance exif.FieldName = "Nikon.ColorBalance" // A sub-IFD 116 Nikon_LensData exif.FieldName = "Nikon.LensData" // A sub-IFD 117 Nikon_SerialNO exif.FieldName = "Nikon.SerialNO" // usually starts with "NO=" 118 Nikon_FlashInfo exif.FieldName = "Nikon.FlashInfo" // A sub-IFD 119 Nikon_MultiExposure exif.FieldName = "Nikon.MultiExposure" // A sub-IFD 120 Nikon_AFInfo2 exif.FieldName = "Nikon.AFInfo2" // A sub-IFD 121 Nikon_FileInfo exif.FieldName = "Nikon.FileInfo" // A sub-IFD 122 Nikon_AFTune exif.FieldName = "Nikon.AFTune" // A sub-IFD 123 Nikon3_0x000a exif.FieldName = "Nikon3.0x000a" 124 Nikon3_0x009b exif.FieldName = "Nikon3.0x009b" 125 Nikon3_0x009f exif.FieldName = "Nikon3.0x009f" 126 Nikon3_0x00a3 exif.FieldName = "Nikon3.0x00a3" 127 128 // Canon-specific fiends 129 Canon_CameraSettings exif.FieldName = "Canon.CameraSettings" // A sub-IFD 130 Canon_ShotInfo exif.FieldName = "Canon.ShotInfo" // A sub-IFD 131 Canon_AFInfo exif.FieldName = "Canon.AFInfo" 132 Canon_TimeInfo exif.FieldName = "Canon.TimeInfo" 133 Canon_0x0000 exif.FieldName = "Canon.0x0000" 134 Canon_0x0003 exif.FieldName = "Canon.0x0003" 135 Canon_0x00b5 exif.FieldName = "Canon.0x00b5" 136 Canon_0x00c0 exif.FieldName = "Canon.0x00c0" 137 Canon_0x00c1 exif.FieldName = "Canon.0x00c1" 138) 139 140var makerNoteCanonFields = map[uint16]exif.FieldName{ 141 0x0000: Canon_0x0000, 142 0x0001: Canon_CameraSettings, 143 0x0002: exif.FocalLength, 144 0x0003: Canon_0x0003, 145 0x0004: Canon_ShotInfo, 146 0x0005: Panorama, 147 0x0006: ImageType, 148 0x0007: FirmwareVersion, 149 0x0008: FileNumber, 150 0x0009: OwnerName, 151 0x000c: SerialNumber, 152 0x000d: CameraInfo, 153 0x000f: CustomFunctions, 154 0x0010: ModelID, 155 0x0012: PictureInfo, 156 0x0013: ThumbnailImageValidArea, 157 0x0015: SerialNumberFormat, 158 0x001a: SuperMacro, 159 0x0026: Canon_AFInfo, 160 0x0035: Canon_TimeInfo, 161 0x0083: OriginalDecisionDataOffset, 162 0x00a4: WhiteBalanceTable, 163 0x0095: LensModel, 164 0x0096: InternalSerialNumber, 165 0x0097: DustRemovalData, 166 0x0099: CustomFunctions, 167 0x00a0: ProcessingInfo, 168 0x00aa: MeasuredColor, 169 0x00b4: exif.ColorSpace, 170 0x00b5: Canon_0x00b5, 171 0x00c0: Canon_0x00c0, 172 0x00c1: Canon_0x00c1, 173 0x00d0: VRDOffset, 174 0x00e0: SensorInfo, 175 0x4001: ColorData, 176} 177 178// Nikon version 3 Maker Notes fields (used by E5400, SQ, D2H, D70, and newer) 179var makerNoteNikon3Fields = map[uint16]exif.FieldName{ 180 0x0001: Nikon_Version, 181 0x0002: ISOSpeed, 182 0x0003: ColorMode, 183 0x0004: Quality, 184 0x0005: Nikon_WhiteBalance, 185 0x0006: Sharpening, 186 0x0007: Focus, 187 0x0008: FlashSetting, 188 0x0009: FlashDevice, 189 0x000a: Nikon3_0x000a, 190 0x000b: WhiteBalanceBias, 191 0x000c: WB_RBLevels, 192 0x000d: ProgramShift, 193 0x000e: ExposureDiff, 194 0x000f: ISOSelection, 195 0x0010: DataDump, 196 0x0011: Preview, 197 0x0012: FlashComp, 198 0x0013: ISOSettings, 199 0x0016: ImageBoundary, 200 0x0017: FlashExposureComp, 201 0x0018: FlashBracketComp, 202 0x0019: ExposureBracketComp, 203 0x001a: ImageProcessing, 204 0x001b: CropHiSpeed, 205 0x001c: ExposureTuning, 206 0x001d: SerialNumber, 207 0x001e: Nikon_ColorSpace, 208 0x001f: Nikon_VRInfo, 209 0x0020: ImageAuthentication, 210 0x0022: ActiveDLighting, 211 0x0023: Nikon_PictureControl, 212 0x0024: Nikon_WorldTime, 213 0x0025: Nikon_ISOInfo, 214 0x002a: VignetteControl, 215 0x0080: ImageAdjustment, 216 0x0081: ToneComp, 217 0x0082: AuxiliaryLens, 218 0x0083: LensType, 219 0x0084: Lens, 220 0x0085: FocusDistance, 221 0x0086: DigitalZoom, 222 0x0087: FlashMode, 223 0x0088: Nikon_AFInfo, 224 0x0089: ShootingMode, 225 0x008a: AutoBracketRelease, 226 0x008b: LensFStops, 227 0x008c: ContrastCurve, 228 0x008d: ColorHue, 229 0x008f: SceneMode, 230 0x0090: Nikon_LightSource, 231 0x0091: Nikon_ShotInfo, 232 0x0092: HueAdjustment, 233 0x0093: NEFCompression, 234 0x0094: Nikon_Saturation, 235 0x0095: NoiseReduction, 236 0x0096: LinearizationTable, 237 0x0097: Nikon_ColorBalance, 238 0x0098: Nikon_LensData, 239 0x0099: RawImageCenter, 240 0x009a: SensorPixelSize, 241 0x009b: Nikon3_0x009b, 242 0x009c: SceneAssist, 243 0x009e: RetouchHistory, 244 0x009f: Nikon3_0x009f, 245 0x00a0: Nikon_SerialNO, 246 0x00a2: ImageDataSize, 247 0x00a3: Nikon3_0x00a3, 248 0x00a5: ImageCount, 249 0x00a6: DeletedImageCount, 250 0x00a7: ShutterCount, 251 0x00a8: Nikon_FlashInfo, 252 0x00a9: ImageOptimization, 253 0x00aa: SaturationText, 254 0x00ab: VariProgram, 255 0x00ac: ImageStabilization, 256 0x00ad: AFResponse, 257 0x00b0: Nikon_MultiExposure, 258 0x00b1: HighISONoiseReduction, 259 0x00b3: ToningEffect, 260 0x00b7: Nikon_AFInfo2, 261 0x00b8: Nikon_FileInfo, 262 0x00b9: Nikon_AFTune, 263 0x0e00: PrintIM, 264 0x0e01: CaptureData, 265 0x0e09: CaptureVersion, 266 0x0e0e: CaptureOffsets, 267 0x0e10: ScanIFD, 268 0x0e1d: ICCProfile, 269 0x0e1e: CaptureOutput, 270} 271