com.drew.metadata.exif
Class NikonType2MakernoteDirectory

java.lang.Object
  extended by com.drew.metadata.Directory
      extended by com.drew.metadata.exif.NikonType2MakernoteDirectory
All Implemented Interfaces:
Serializable

public class NikonType2MakernoteDirectory
extends Directory

Describes tags specific to Nikon (type 2) 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).

See Also:
Serialized Form

Field Summary
protected static HashMap _tagNameMap
           
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.
 
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()
          Provides the name of the directory, for display purposes.
protected  HashMap getTagNameMap()
          Provides the map of tag names, hashed by tag type identifier.
 
Methods inherited from class com.drew.metadata.Directory
addError, containsTag, getBoolean, getByteArray, getDate, getDescription, getDouble, getErrorCount, getErrors, getFloat, getInt, getIntArray, getLong, getObject, getRational, getRationalArray, getString, getStringArray, getTagCount, getTagIterator, getTagName, hasErrors, setBoolean, setByteArray, setDate, setDescriptor, setDouble, setFloat, setInt, setIntArray, setLong, setObject, setObjectArray, setRational, setRationalArray, setString, setStringArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_NIKON_TYPE2_FIRMWARE_VERSION

public static final int TAG_NIKON_TYPE2_FIRMWARE_VERSION
Values observed - 0200 (D70) - 0200 (D1X)

See Also:
Constant Field Values

TAG_NIKON_TYPE2_ISO_1

public static final int TAG_NIKON_TYPE2_ISO_1
Values observed - 0 250 - 0 400

See Also:
Constant Field Values

TAG_NIKON_TYPE2_COLOR_MODE

public static final int TAG_NIKON_TYPE2_COLOR_MODE
Values observed - COLOR (seen in the D1X)

See Also:
Constant Field Values

TAG_NIKON_TYPE2_QUALITY_AND_FILE_FORMAT

public static final int TAG_NIKON_TYPE2_QUALITY_AND_FILE_FORMAT
Values observed - FILE - RAW - NORMAL - FINE

See Also:
Constant Field Values

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)

See Also:
Constant Field Values

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)

See Also:
Constant Field Values

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

See Also:
Constant Field Values

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"

See Also:
Constant Field Values

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)

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

TAG_NIKON_TYPE2_CAMERA_WHITE_BALANCE_FINE

public static final int TAG_NIKON_TYPE2_CAMERA_WHITE_BALANCE_FINE
Values observed - 0

See Also:
Constant Field Values

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

See Also:
Constant Field Values

TAG_NIKON_TYPE2_UNKNOWN_1

public static final int TAG_NIKON_TYPE2_UNKNOWN_1
Values observed - 0,1,6,0 (hex)

See Also:
Constant Field Values

TAG_NIKON_TYPE2_UNKNOWN_2

public static final int TAG_NIKON_TYPE2_UNKNOWN_2
Values observed - î - 0,1,c,0 (hex)

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

TAG_NIKON_TYPE2_UNKNOWN_3

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

See Also:
Constant Field Values

TAG_NIKON_TYPE2_AUTO_FLASH_COMPENSATION

public static final int TAG_NIKON_TYPE2_AUTO_FLASH_COMPENSATION
Values observed - (no value -- blank)

See Also:
Constant Field Values

TAG_NIKON_TYPE2_ISO_2

public static final int TAG_NIKON_TYPE2_ISO_2
Values observed - 0 250 - 0 400

See Also:
Constant Field Values

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)

See Also:
Constant Field Values

TAG_NIKON_TYPE2_UNKNOWN_22

public static final int TAG_NIKON_TYPE2_UNKNOWN_22
Values observed - (blank)

See Also:
Constant Field Values

TAG_NIKON_TYPE2_UNKNOWN_23

public static final int TAG_NIKON_TYPE2_UNKNOWN_23
Values observed - (blank)

See Also:
Constant Field Values

TAG_NIKON_TYPE2_UNKNOWN_24

public static final int TAG_NIKON_TYPE2_UNKNOWN_24
Values observed - 0

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

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)

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

TAG_NIKON_TYPE2_UNKNOWN_4

public static final int TAG_NIKON_TYPE2_UNKNOWN_4
Values observed - 6 - 6 (D70) - 2 (D1X)

See Also:
Constant Field Values

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

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

TAG_NIKON_TYPE2_UNKNOWN_5

public static final int TAG_NIKON_TYPE2_UNKNOWN_5
Values observed - 0 - 9 - 3 (D1X)

See Also:
Constant Field Values

TAG_NIKON_TYPE2_AF_FOCUS_POSITION

public static final int TAG_NIKON_TYPE2_AF_FOCUS_POSITION
Values observed -

See Also:
Constant Field Values

TAG_NIKON_TYPE2_UNKNOWN_7

public static final int TAG_NIKON_TYPE2_UNKNOWN_7
Values observed - 0 - 1

See Also:
Constant Field Values

TAG_NIKON_TYPE2_UNKNOWN_20

public static final int TAG_NIKON_TYPE2_UNKNOWN_20
Values observed - 0 - 0

See Also:
Constant Field Values

TAG_NIKON_TYPE2_UNKNOWN_8

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

See Also:
Constant Field Values

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)

See Also:
Constant Field Values

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)

See Also:
Constant Field Values

TAG_NIKON_TYPE2_LIGHT_SOURCE

public static final int TAG_NIKON_TYPE2_LIGHT_SOURCE
Values observed - NATURAL - SPEEDLIGHT (D70, D1X)

See Also:
Constant Field Values

TAG_NIKON_TYPE2_UNKNOWN_11

public static final int TAG_NIKON_TYPE2_UNKNOWN_11
Values observed - 0100) - 0103 (D70) - 0100 (D1X)

See Also:
Constant Field Values

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

See Also:
Constant Field Values

TAG_NIKON_TYPE2_NOISE_REDUCTION

public static final int TAG_NIKON_TYPE2_NOISE_REDUCTION
Values observed - OFF

See Also:
Constant Field Values

TAG_NIKON_TYPE2_UNKNOWN_12

public static final int TAG_NIKON_TYPE2_UNKNOWN_12
Values observed - 0100 '~e3 - 0103

See Also:
Constant Field Values

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)

See Also:
Constant Field Values

TAG_NIKON_TYPE2_UNKNOWN_14

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

See Also:
Constant Field Values

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)

See Also:
Constant Field Values

TAG_NIKON_TYPE2_UNKNOWN_25

public static final int TAG_NIKON_TYPE2_UNKNOWN_25
Values observed - NO= 00002539

See Also:
Constant Field Values

TAG_NIKON_TYPE2_UNKNOWN_26

public static final int TAG_NIKON_TYPE2_UNKNOWN_26
Values observed - 1564851

See Also:
Constant Field Values

TAG_NIKON_TYPE2_UNKNOWN_27

public static final int TAG_NIKON_TYPE2_UNKNOWN_27
Values observed - 0

See Also:
Constant Field Values

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

See Also:
Constant Field Values

TAG_NIKON_TYPE2_UNKNOWN_32

public static final int TAG_NIKON_TYPE2_UNKNOWN_32
Values observed - 0100 (D70)

See Also:
Constant Field Values

TAG_NIKON_TYPE2_UNKNOWN_33

public static final int TAG_NIKON_TYPE2_UNKNOWN_33
Values observed - NORMAL (D70)

See Also:
Constant Field Values

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)

See Also:
Constant Field Values

TAG_NIKON_TYPE2_UNKNOWN_30

public static final int TAG_NIKON_TYPE2_UNKNOWN_30
Values observed - AUTO (D70) - (blank) (D70)

See Also:
Constant Field Values

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

See Also:
Constant Field Values

TAG_NIKON_TYPE2_UNKNOWN_16

public static final int TAG_NIKON_TYPE2_UNKNOWN_16
Values observed - 1473 - 7036 (D100)

See Also:
Constant Field Values

_tagNameMap

protected static final HashMap _tagNameMap
Constructor Detail

NikonType2MakernoteDirectory

public NikonType2MakernoteDirectory()
Method Detail

getAutoFlashCompensation

public Rational getAutoFlashCompensation()
                                  throws MetadataException
Throws:
MetadataException

CalculateFlashCompensationFromBytes

public static Rational CalculateFlashCompensationFromBytes(byte[] bytes)

getName

public String getName()
Description copied from class: Directory
Provides the name of the directory, for display purposes. E.g. Exif

Specified by:
getName in class Directory
Returns:
the name of the directory

getTagNameMap

protected HashMap getTagNameMap()
Description copied from class: Directory
Provides the map of tag names, hashed by tag type identifier.

Specified by:
getTagNameMap in class Directory
Returns:
the map of tag names