com.drew.metadata.exif

Class NikonType2MakernoteDirectory

Implemented Interfaces:
Serializable

public class NikonType2MakernoteDirectory
extends Directory

Contains values specific to Nikon cameras. Type-2 applies to the E990 and D-series cameras such as the E990, D1, D70 and D100. Thanks to Fabrizio Giudici for publishing his reverse-engineering of the D100 makernote data. http://www.timelesswanderings.net/equipment/D100/NEF.html Note that the camera implements image protection (locking images) via the file's 'readonly' attribute. Similarly image hiding uses the 'hidden' attribute (observed on the D70). Consequently, these values are not available here. Additional sample images have been observed, and their tag values recorded in javadoc comments for each tag's field. New tags have subsequently been added since Fabrizio's observations. In earlier models (such as the E990 and D1), this directory begins at the first byte of the makernote IFD. In later models, the IFD was given the standard prefix to indicate the camera models (most other manufacturers also provide this prefix to aid in software decoding).

Field Summary

static int
TAG_NIKON_TYPE2_ADAPTER
Added during merge of Type2 & Type3.
static int
TAG_NIKON_TYPE2_AF_FOCUS_POSITION
Values observed -
static int
TAG_NIKON_TYPE2_AF_TYPE
The auto-focus type used by the camera.
static int
TAG_NIKON_TYPE2_AUTO_FLASH_COMPENSATION
Values observed - (no value -- blank)
static int
TAG_NIKON_TYPE2_AUTO_FLASH_MODE
Values observed - Built-in,TTL - Optional,TTL (with speedlight SB800, flash sync mode as NORMAL.
static int
TAG_NIKON_TYPE2_CAMERA_COLOR_MODE
The color space as set in the camera.
static int
TAG_NIKON_TYPE2_CAMERA_HUE_ADJUSTMENT
The hue adjustment as set in the camera.
static int
TAG_NIKON_TYPE2_CAMERA_SHARPENING
The sharpening as set in the camera.
static int
TAG_NIKON_TYPE2_CAMERA_TONE_COMPENSATION
The tone compensation as set in the camera.
static int
TAG_NIKON_TYPE2_CAMERA_WHITE_BALANCE
The white balance as set in the camera.
static int
TAG_NIKON_TYPE2_CAMERA_WHITE_BALANCE_FINE
Values observed - 0
static int
TAG_NIKON_TYPE2_CAMERA_WHITE_BALANCE_RB_COEFF
The first two numbers are coefficients to multiply red and blue channels according to white balance as set in the camera.
static int
TAG_NIKON_TYPE2_CAPTURE_EDITOR_DATA
Data about changes set by Nikon Capture Editor.
static int
TAG_NIKON_TYPE2_COLOR_MODE
Values observed - COLOR (seen in the D1X)
static int
TAG_NIKON_TYPE2_DATA_DUMP
Added during merge of Type2 & Type3.
static int
TAG_NIKON_TYPE2_DIGITAL_ZOOM
Added during merge of Type2 & Type3.
static int
TAG_NIKON_TYPE2_EXPOSURE_SEQUENCE_NUMBER
This appears to be a sequence number to indentify the exposure.
static int
TAG_NIKON_TYPE2_FIRMWARE_VERSION
Values observed - 0200 (D70) - 0200 (D1X)
static int
TAG_NIKON_TYPE2_FLASH_SYNC_MODE
Values observed - NORMAL - RED-EYE Note: when TAG_NIKON_TYPE2_AUTO_FLASH_MODE is blank, Nikon Browser displays "Flash Sync Mode: Not Attached"
static int
TAG_NIKON_TYPE2_IMAGE_ADJUSTMENT
Added during merge of Type2 & Type3.
static int
TAG_NIKON_TYPE2_ISO_1
Values observed - 0 250 - 0 400
static int
TAG_NIKON_TYPE2_ISO_2
Values observed - 0 250 - 0 400
static int
TAG_NIKON_TYPE2_ISO_SELECTION
Added during merge of Type2 & Type3.
static int
TAG_NIKON_TYPE2_LENS
A pair of focal/max-fstop values that describe the lens used.
static int
TAG_NIKON_TYPE2_LIGHT_SOURCE
Values observed - NATURAL - SPEEDLIGHT (D70, D1X)
static int
TAG_NIKON_TYPE2_MANUAL_FOCUS_DISTANCE
Added during merge of Type2 & Type3.
static int
TAG_NIKON_TYPE2_NOISE_REDUCTION
Values observed - OFF
static int
TAG_NIKON_TYPE2_QUALITY_AND_FILE_FORMAT
Values observed - FILE - RAW - NORMAL - FINE
static int
TAG_NIKON_TYPE2_UNKNOWN_1
Values observed - 0,1,6,0 (hex)
static int
TAG_NIKON_TYPE2_UNKNOWN_11
Values observed - 0100) - 0103 (D70) - 0100 (D1X)
static int
TAG_NIKON_TYPE2_UNKNOWN_12
Values observed - 0100 '~e3 - 0103
static int
TAG_NIKON_TYPE2_UNKNOWN_13
Values observed - 0100fht@7b,4x,D"Y - 01015 - 0100w\cH+D$$h$�5Q (D1X) - 30,31,30,30,0,0,b,48,7c,7c,24,24,5,15,24,0,0,0,0,0 (hex) (D100)
static int
TAG_NIKON_TYPE2_UNKNOWN_14
Values observed - 2014 662 (D1X) - 1517,1012 (D100)
static int
TAG_NIKON_TYPE2_UNKNOWN_15
Values observed - 78/10 78/10 - 78/10 78/10 (D70) - 59/10 59/5 (D1X) - 7.8,7.8 (D100)
static int
TAG_NIKON_TYPE2_UNKNOWN_16
Values observed - 1473 - 7036 (D100)
static int
TAG_NIKON_TYPE2_UNKNOWN_2
Values observed - � - 0,1,c,0 (hex)
static int
TAG_NIKON_TYPE2_UNKNOWN_20
Values observed - 0 - 0
static int
TAG_NIKON_TYPE2_UNKNOWN_21
Values observed - 0 0 49163 53255 - 0 0 3008 2000 (the image dimensions were 3008x2000) (D70)
static int
TAG_NIKON_TYPE2_UNKNOWN_22
Values observed - (blank)
static int
TAG_NIKON_TYPE2_UNKNOWN_23
Values observed - (blank)
static int
TAG_NIKON_TYPE2_UNKNOWN_24
Values observed - 0
static int
TAG_NIKON_TYPE2_UNKNOWN_25
Values observed - NO= 00002539
static int
TAG_NIKON_TYPE2_UNKNOWN_26
Values observed - 1564851
static int
TAG_NIKON_TYPE2_UNKNOWN_27
Values observed - 0
static int
TAG_NIKON_TYPE2_UNKNOWN_29
Nikon Browser suggests this value represents Saturation...
static int
TAG_NIKON_TYPE2_UNKNOWN_3
Values observed - 914 - 1379 (D70) - 2781 (D1X) - 6942 (D100)
static int
TAG_NIKON_TYPE2_UNKNOWN_30
Values observed - AUTO (D70) - (blank) (D70)
static int
TAG_NIKON_TYPE2_UNKNOWN_32
Values observed - 0100 (D70)
static int
TAG_NIKON_TYPE2_UNKNOWN_33
Values observed - NORMAL (D70)
static int
TAG_NIKON_TYPE2_UNKNOWN_34
Added during merge of Type2 & Type3.
static int
TAG_NIKON_TYPE2_UNKNOWN_4
Values observed - 6 - 6 (D70) - 2 (D1X)
static int
TAG_NIKON_TYPE2_UNKNOWN_5
Values observed - 0 - 9 - 3 (D1X)
static int
TAG_NIKON_TYPE2_UNKNOWN_7
Values observed - 0 - 1
static int
TAG_NIKON_TYPE2_UNKNOWN_8
Values observed - 48,1,c,0 (hex) (D100) - @
static int
TAG_NIKON_TYPE2_UNKNOWN_9
Unknown.
protected static HashMap
_tagNameMap

Fields inherited from class com.drew.metadata.Directory

_definedTagList, _descriptor, _tagMap

Constructor Summary

NikonType2MakernoteDirectory()

Method Summary

static Rational
CalculateFlashCompensationFromBytes(byte[] bytes)
Rational
getAutoFlashCompensation()
String
getName()
protected HashMap
getTagNameMap()

Methods inherited from class com.drew.metadata.Directory

addError, containsTag, getBoolean, getByteArray, getDate, getDescription, getDouble, getErrorCount, getErrors, getFloat, getInt, getIntArray, getLong, getName, getObject, getRational, getRationalArray, getString, getStringArray, getTagCount, getTagIterator, getTagName, getTagNameMap, hasErrors, setBoolean, setByteArray, setDate, setDescriptor, setDouble, setFloat, setInt, setIntArray, setLong, setObject, setObjectArray, setRational, setRationalArray, setString, setStringArray

Field Details

TAG_NIKON_TYPE2_ADAPTER

public static final int TAG_NIKON_TYPE2_ADAPTER
Added during merge of Type2 & Type3. May apply to earlier models, such as E990 and D1.
Field Value:
130

TAG_NIKON_TYPE2_AF_FOCUS_POSITION

public static final int TAG_NIKON_TYPE2_AF_FOCUS_POSITION
Values observed -
Field Value:
136

TAG_NIKON_TYPE2_AF_TYPE

public static final int TAG_NIKON_TYPE2_AF_TYPE
The auto-focus type used by the camera. Values observed - AF-S - AF-C - MANUAL
Field Value:
7

TAG_NIKON_TYPE2_AUTO_FLASH_COMPENSATION

public static final int TAG_NIKON_TYPE2_AUTO_FLASH_COMPENSATION
Values observed - (no value -- blank)
Field Value:
18

TAG_NIKON_TYPE2_AUTO_FLASH_MODE

public static final int TAG_NIKON_TYPE2_AUTO_FLASH_MODE
Values observed - Built-in,TTL - Optional,TTL (with speedlight SB800, flash sync mode as NORMAL. NikonBrowser reports Auto Flash Comp: 0 EV -- which tag is that?) (D70) - NEW_TTL (Nikon Browser interprets as "D-TTL") - (blank -- accompanied FlashSyncMode of NORMAL) (D70)
Field Value:
9

TAG_NIKON_TYPE2_CAMERA_COLOR_MODE

public static final int TAG_NIKON_TYPE2_CAMERA_COLOR_MODE
The color space as set in the camera. Values observed - MODE1 - Mode I (sRGB) (D70) - MODE2 (D1X, D100)
Field Value:
141

TAG_NIKON_TYPE2_CAMERA_HUE_ADJUSTMENT

public static final int TAG_NIKON_TYPE2_CAMERA_HUE_ADJUSTMENT
The hue adjustment as set in the camera. Values observed - 0
Field Value:
146

TAG_NIKON_TYPE2_CAMERA_SHARPENING

public static final int TAG_NIKON_TYPE2_CAMERA_SHARPENING
The sharpening as set in the camera. Values observed - AUTO - NORMAL (D70) - NONE (D1X)
Field Value:
6

TAG_NIKON_TYPE2_CAMERA_TONE_COMPENSATION

public static final int TAG_NIKON_TYPE2_CAMERA_TONE_COMPENSATION
The tone compensation as set in the camera. Values observed - AUTO - NORMAL (D1X, D100)
Field Value:
129

TAG_NIKON_TYPE2_CAMERA_WHITE_BALANCE

public static final int TAG_NIKON_TYPE2_CAMERA_WHITE_BALANCE
The white balance as set in the camera. Values observed - AUTO - SUNNY (D70) - FLASH (D1X) (presumably also SHADOW / INCANDESCENT / FLUORESCENT / CLOUDY)
Field Value:
5

TAG_NIKON_TYPE2_CAMERA_WHITE_BALANCE_FINE

public static final int TAG_NIKON_TYPE2_CAMERA_WHITE_BALANCE_FINE
Values observed - 0
Field Value:
11

TAG_NIKON_TYPE2_CAMERA_WHITE_BALANCE_RB_COEFF

public static final int TAG_NIKON_TYPE2_CAMERA_WHITE_BALANCE_RB_COEFF
The first two numbers are coefficients to multiply red and blue channels according to white balance as set in the camera. The meaning of the third and the fourth numbers is unknown. Values observed - 2.25882352 1.76078431 0.0 0.0 - 10242/1 34305/1 0/1 0/1 - 234765625/100000000 1140625/1000000 1/1 1/1
Field Value:
12

TAG_NIKON_TYPE2_CAPTURE_EDITOR_DATA

public static final int TAG_NIKON_TYPE2_CAPTURE_EDITOR_DATA
Data about changes set by Nikon Capture Editor. Values observed
Field Value:
3585

TAG_NIKON_TYPE2_COLOR_MODE

public static final int TAG_NIKON_TYPE2_COLOR_MODE
Values observed - COLOR (seen in the D1X)
Field Value:
3

TAG_NIKON_TYPE2_DATA_DUMP

public static final int TAG_NIKON_TYPE2_DATA_DUMP
Added during merge of Type2 & Type3. May apply to earlier models, such as E990 and D1.
Field Value:
16

TAG_NIKON_TYPE2_DIGITAL_ZOOM

public static final int TAG_NIKON_TYPE2_DIGITAL_ZOOM
Added during merge of Type2 & Type3. May apply to earlier models, such as E990 and D1.
Field Value:
134

TAG_NIKON_TYPE2_EXPOSURE_SEQUENCE_NUMBER

public static final int TAG_NIKON_TYPE2_EXPOSURE_SEQUENCE_NUMBER
This appears to be a sequence number to indentify the exposure. This value seems to increment for consecutive exposures (observed on D70). Values observed - 5062
Field Value:
167

TAG_NIKON_TYPE2_FIRMWARE_VERSION

public static final int TAG_NIKON_TYPE2_FIRMWARE_VERSION
Values observed - 0200 (D70) - 0200 (D1X)
Field Value:
1

TAG_NIKON_TYPE2_FLASH_SYNC_MODE

public static final int TAG_NIKON_TYPE2_FLASH_SYNC_MODE
Values observed - NORMAL - RED-EYE Note: when TAG_NIKON_TYPE2_AUTO_FLASH_MODE is blank, Nikon Browser displays "Flash Sync Mode: Not Attached"
Field Value:
8

TAG_NIKON_TYPE2_IMAGE_ADJUSTMENT

public static final int TAG_NIKON_TYPE2_IMAGE_ADJUSTMENT
Added during merge of Type2 & Type3. May apply to earlier models, such as E990 and D1.
Field Value:
128

TAG_NIKON_TYPE2_ISO_1

public static final int TAG_NIKON_TYPE2_ISO_1
Values observed - 0 250 - 0 400
Field Value:
2

TAG_NIKON_TYPE2_ISO_2

public static final int TAG_NIKON_TYPE2_ISO_2
Values observed - 0 250 - 0 400
Field Value:
19

TAG_NIKON_TYPE2_ISO_SELECTION

public static final int TAG_NIKON_TYPE2_ISO_SELECTION
Added during merge of Type2 & Type3. May apply to earlier models, such as E990 and D1.
Field Value:
15

TAG_NIKON_TYPE2_LENS

public static final int TAG_NIKON_TYPE2_LENS
A pair of focal/max-fstop values that describe the lens used. Values observed - 180.0,180.0,2.8,2.8 (D100) - 240/10 850/10 35/10 45/10 - 18-70mm f/3.5-4.5 (D70) - 17-35mm f/2.8-2.8 (D1X) - 70-200mm f/2.8-2.8 (D70) Nikon Browser identifies the lens as "18-70mm F/3.5-4.5 G" which is identical to metadata extractor, except for the "G". This must be coming from another tag...
Field Value:
132

TAG_NIKON_TYPE2_LIGHT_SOURCE

public static final int TAG_NIKON_TYPE2_LIGHT_SOURCE
Values observed - NATURAL - SPEEDLIGHT (D70, D1X)
Field Value:
144

TAG_NIKON_TYPE2_MANUAL_FOCUS_DISTANCE

public static final int TAG_NIKON_TYPE2_MANUAL_FOCUS_DISTANCE
Added during merge of Type2 & Type3. May apply to earlier models, such as E990 and D1.
Field Value:
133

TAG_NIKON_TYPE2_NOISE_REDUCTION

public static final int TAG_NIKON_TYPE2_NOISE_REDUCTION
Values observed - OFF
Field Value:
149

TAG_NIKON_TYPE2_QUALITY_AND_FILE_FORMAT

public static final int TAG_NIKON_TYPE2_QUALITY_AND_FILE_FORMAT
Values observed - FILE - RAW - NORMAL - FINE
Field Value:
4

TAG_NIKON_TYPE2_UNKNOWN_1

public static final int TAG_NIKON_TYPE2_UNKNOWN_1
Values observed - 0,1,6,0 (hex)
Field Value:
13

TAG_NIKON_TYPE2_UNKNOWN_11

public static final int TAG_NIKON_TYPE2_UNKNOWN_11
Values observed - 0100) - 0103 (D70) - 0100 (D1X)
Field Value:
145

TAG_NIKON_TYPE2_UNKNOWN_12

public static final int TAG_NIKON_TYPE2_UNKNOWN_12
Values observed - 0100 '~e3 - 0103
Field Value:
151

TAG_NIKON_TYPE2_UNKNOWN_13

public static final int TAG_NIKON_TYPE2_UNKNOWN_13
Values observed - 0100fht@7b,4x,D"Y - 01015 - 0100w\cH+D$$h$�5Q (D1X) - 30,31,30,30,0,0,b,48,7c,7c,24,24,5,15,24,0,0,0,0,0 (hex) (D100)
Field Value:
152

TAG_NIKON_TYPE2_UNKNOWN_14

public static final int TAG_NIKON_TYPE2_UNKNOWN_14
Values observed - 2014 662 (D1X) - 1517,1012 (D100)
Field Value:
153

TAG_NIKON_TYPE2_UNKNOWN_15

public static final int TAG_NIKON_TYPE2_UNKNOWN_15
Values observed - 78/10 78/10 - 78/10 78/10 (D70) - 59/10 59/5 (D1X) - 7.8,7.8 (D100)
Field Value:
154

TAG_NIKON_TYPE2_UNKNOWN_16

public static final int TAG_NIKON_TYPE2_UNKNOWN_16
Values observed - 1473 - 7036 (D100)
Field Value:
3600

TAG_NIKON_TYPE2_UNKNOWN_2

public static final int TAG_NIKON_TYPE2_UNKNOWN_2
Values observed - � - 0,1,c,0 (hex)
Field Value:
14

TAG_NIKON_TYPE2_UNKNOWN_20

public static final int TAG_NIKON_TYPE2_UNKNOWN_20
Values observed - 0 - 0
Field Value:
138

TAG_NIKON_TYPE2_UNKNOWN_21

public static final int TAG_NIKON_TYPE2_UNKNOWN_21
Values observed - 0 0 49163 53255 - 0 0 3008 2000 (the image dimensions were 3008x2000) (D70)
Field Value:
22

TAG_NIKON_TYPE2_UNKNOWN_22

public static final int TAG_NIKON_TYPE2_UNKNOWN_22
Values observed - (blank)
Field Value:
23

TAG_NIKON_TYPE2_UNKNOWN_23

public static final int TAG_NIKON_TYPE2_UNKNOWN_23
Values observed - (blank)
Field Value:
24

TAG_NIKON_TYPE2_UNKNOWN_24

public static final int TAG_NIKON_TYPE2_UNKNOWN_24
Values observed - 0
Field Value:
25

TAG_NIKON_TYPE2_UNKNOWN_25

public static final int TAG_NIKON_TYPE2_UNKNOWN_25
Values observed - NO= 00002539
Field Value:
160

TAG_NIKON_TYPE2_UNKNOWN_26

public static final int TAG_NIKON_TYPE2_UNKNOWN_26
Values observed - 1564851
Field Value:
162

TAG_NIKON_TYPE2_UNKNOWN_27

public static final int TAG_NIKON_TYPE2_UNKNOWN_27
Values observed - 0
Field Value:
163

TAG_NIKON_TYPE2_UNKNOWN_29

public static final int TAG_NIKON_TYPE2_UNKNOWN_29
Nikon Browser suggests this value represents Saturation... Values observed - NORMAL (D70)
Field Value:
170

TAG_NIKON_TYPE2_UNKNOWN_3

public static final int TAG_NIKON_TYPE2_UNKNOWN_3
Values observed - 914 - 1379 (D70) - 2781 (D1X) - 6942 (D100)
Field Value:
17

TAG_NIKON_TYPE2_UNKNOWN_30

public static final int TAG_NIKON_TYPE2_UNKNOWN_30
Values observed - AUTO (D70) - (blank) (D70)
Field Value:
171

TAG_NIKON_TYPE2_UNKNOWN_32

public static final int TAG_NIKON_TYPE2_UNKNOWN_32
Values observed - 0100 (D70)
Field Value:
168

TAG_NIKON_TYPE2_UNKNOWN_33

public static final int TAG_NIKON_TYPE2_UNKNOWN_33
Values observed - NORMAL (D70)
Field Value:
169

TAG_NIKON_TYPE2_UNKNOWN_34

public static final int TAG_NIKON_TYPE2_UNKNOWN_34
Added during merge of Type2 & Type3. May apply to earlier models, such as E990 and D1.
Field Value:
10

TAG_NIKON_TYPE2_UNKNOWN_4

public static final int TAG_NIKON_TYPE2_UNKNOWN_4
Values observed - 6 - 6 (D70) - 2 (D1X)
Field Value:
131

TAG_NIKON_TYPE2_UNKNOWN_5

public static final int TAG_NIKON_TYPE2_UNKNOWN_5
Values observed - 0 - 9 - 3 (D1X)
Field Value:
135

TAG_NIKON_TYPE2_UNKNOWN_7

public static final int TAG_NIKON_TYPE2_UNKNOWN_7
Values observed - 0 - 1
Field Value:
137

TAG_NIKON_TYPE2_UNKNOWN_8

public static final int TAG_NIKON_TYPE2_UNKNOWN_8
Values observed - 48,1,c,0 (hex) (D100) - @
Field Value:
139

TAG_NIKON_TYPE2_UNKNOWN_9

public static final int TAG_NIKON_TYPE2_UNKNOWN_9
Unknown. Fabrizio believes this may be a lookup table for the user-defined curve. Values observed - (blank) (D1X)
Field Value:
140

_tagNameMap

protected static final HashMap _tagNameMap

Constructor Details

NikonType2MakernoteDirectory

public NikonType2MakernoteDirectory()

Method Details

CalculateFlashCompensationFromBytes

public static Rational CalculateFlashCompensationFromBytes(byte[] bytes)

getAutoFlashCompensation

public Rational getAutoFlashCompensation()
            throws MetadataException

getName

public String getName()
Overrides:
getName in interface Directory

getTagNameMap

protected HashMap getTagNameMap()
Overrides:
getTagNameMap in interface Directory

Copyright © 2006 Drew Noakes. All Rights Reserved.