com.drew.metadata.exif
Class CanonMakernoteDirectory

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

public class CanonMakernoteDirectory
extends Directory

Describes tags specific to Canon cameras. Thanks to Bill Richards for his contribution to this makernote directory. Many tag definitions explained here: http://www.ozhiker.com/electronics/pjmt/jpeg_info/canon_mn.html

See Also:
Serialized Form

Field Summary
protected static HashMap _tagNameMap
           
static int TAG_CANON_CAMERA_STATE_1
           
static int TAG_CANON_CAMERA_STATE_2
           
static int TAG_CANON_CUSTOM_FUNCTION_AF_ASSIST_LIGHT
          AF-assist light 0 = On (Auto) 1 = Off
static int TAG_CANON_CUSTOM_FUNCTION_AF_STOP
          Lens Auto-Focus stop button Function Switch 0 = AF stop 1 = Operate AF 2 = Lock AE and start timer
static int TAG_CANON_CUSTOM_FUNCTION_BRACKETTING
          Auto-Exposure Bracketting sequence/auto cancellation 0 = 0,-,+ / Enabled 1 = 0,-,+ / Disabled 2 = -,0,+ / Enabled 3 = -,0,+ / Disabled
static int TAG_CANON_CUSTOM_FUNCTION_FILL_FLASH_REDUCTION
          Auto reduction of fill flash 0 = Enable 1 = Disable
static int TAG_CANON_CUSTOM_FUNCTION_LONG_EXPOSURE_NOISE_REDUCTION
          Long Exposure Noise Reduction 0 = Off 1 = On
static int TAG_CANON_CUSTOM_FUNCTION_MENU_BUTTON_RETURN
          Menu button return position 0 = Top 1 = Previous (volatile) 2 = Previous
static int TAG_CANON_CUSTOM_FUNCTION_MIRROR_LOCKUP
          Mirror lockup 0 = Disable 1 = Enable
static int TAG_CANON_CUSTOM_FUNCTION_SENSOR_CLEANING
          Sensor cleaning 0 = Disable 1 = Enable
static int TAG_CANON_CUSTOM_FUNCTION_SET_BUTTON_FUNCTION
          SET button function when shooting 0 = Not Assigned 1 = Change Quality 2 = Change ISO Speed 3 = Select Parameters
static int TAG_CANON_CUSTOM_FUNCTION_SHUTTER_AUTO_EXPOSURE_LOCK_BUTTONS
          Shutter/Auto Exposure-lock buttons 0 = AF/AE lock 1 = AE lock/AF 2 = AF/AF lock 3 = AE+release/AE+AF
static int TAG_CANON_CUSTOM_FUNCTION_SHUTTER_CURTAIN_SYNC
          Shutter Curtain Sync 0 = 1st Curtain Sync 1 = 2nd Curtain Sync
static int TAG_CANON_CUSTOM_FUNCTION_SHUTTER_SPEED_IN_AV_MODE
          Shutter speed in Av mode 0 = Automatic 1 = 1/200 (fixed)
static int TAG_CANON_CUSTOM_FUNCTION_TV_AV_AND_EXPOSURE_LEVEL
          Tv/Av and exposure level 0 = 1/2 stop 1 = 1/3 stop
static int TAG_CANON_CUSTOM_FUNCTIONS
           
static int TAG_CANON_FIRMWARE_VERSION
           
static int TAG_CANON_IMAGE_NUMBER
           
static int TAG_CANON_IMAGE_TYPE
           
static int TAG_CANON_OWNER_NAME
           
static int TAG_CANON_SERIAL_NUMBER
          To display serial number as on camera use: printf( "%04X%05d", highbyte, lowbyte ) TODO handle this in CanonMakernoteDescriptor
static int TAG_CANON_STATE1_AF_POINT_SELECTED
          12288 = None (Manual Focus) 12289 = Auto Selected 12290 = Right 12291 = Centre 12292 = Left
static int TAG_CANON_STATE1_CONTINUOUS_DRIVE_MODE
          0 = Single Frame or Timer Mode 1 = Continuous
static int TAG_CANON_STATE1_CONTRAST
          0 = Normal 1 = High 65535 = Low
static int TAG_CANON_STATE1_DIGITAL_ZOOM
          0 = No Digital Zoom 1 = 2x 2 = 4x
static int TAG_CANON_STATE1_EASY_SHOOTING_MODE
          0 = Full Auto 1 = Manual 2 = Landscape 3 = Fast Shutter 4 = Slow Shutter 5 = Night 6 = Black & White 7 = Sepia 8 = Portrait 9 = Sports 10 = Macro / Close-Up 11 = Pan Focus
static int TAG_CANON_STATE1_EXPOSURE_MODE
          0 = Easy Shooting (See Easy Shooting Mode) 1 = Program 2 = Tv-Priority 3 = Av-Priority 4 = Manual 5 = A-DEP
static int TAG_CANON_STATE1_FLASH_ACTIVITY
          0 = Flash Did Not Fire 1 = Flash Fired
static int TAG_CANON_STATE1_FLASH_DETAILS
           
static int TAG_CANON_STATE1_FLASH_MODE
          0 = Flash Not Fired 1 = Auto 2 = On 3 = Red Eye Reduction 4 = Slow Synchro 5 = Auto + Red Eye Reduction 6 = On + Red Eye Reduction 16 = External Flash
static int TAG_CANON_STATE1_FOCAL_UNITS_PER_MM
           
static int TAG_CANON_STATE1_FOCUS_MODE_1
          0 = One-Shot 1 = AI Servo 2 = AI Focus 3 = Manual Focus 4 = Single 5 = Continuous 6 = Manual Focus
static int TAG_CANON_STATE1_FOCUS_MODE_2
          0 = Focus Mode: Single 1 = Focus Mode: Continuous
static int TAG_CANON_STATE1_FOCUS_TYPE
          0 = Manual 1 = Auto 3 = Close-up (Macro) 8 = Locked (Pan Mode)
static int TAG_CANON_STATE1_IMAGE_SIZE
          0 = Large 1 = Medium 2 = Small
static int TAG_CANON_STATE1_ISO
          0 = Check ISOSpeedRatings EXIF tag for ISO Speed 15 = Auto ISO 16 = ISO 50 17 = ISO 100 18 = ISO 200 19 = ISO 400
static int TAG_CANON_STATE1_LONG_FOCAL_LENGTH
           
static int TAG_CANON_STATE1_MACRO_MODE
          1 = Macro 2 = Normal
static int TAG_CANON_STATE1_METERING_MODE
          3 = Evaluative 4 = Partial 5 = Centre Weighted
static int TAG_CANON_STATE1_QUALITY
          2 = Normal 3 = Fine 5 = Superfine
static int TAG_CANON_STATE1_SATURATION
          0 = Normal 1 = High 65535 = Low
static int TAG_CANON_STATE1_SELF_TIMER_DELAY
           
static int TAG_CANON_STATE1_SHARPNESS
          0 = Normal 1 = High 65535 = Low
static int TAG_CANON_STATE1_SHORT_FOCAL_LENGTH
           
static int TAG_CANON_STATE1_UNKNOWN_10
           
static int TAG_CANON_STATE1_UNKNOWN_12
           
static int TAG_CANON_STATE1_UNKNOWN_13
           
static int TAG_CANON_STATE1_UNKNOWN_2
           
static int TAG_CANON_STATE1_UNKNOWN_3
           
static int TAG_CANON_STATE1_UNKNOWN_4
           
static int TAG_CANON_STATE1_UNKNOWN_7
           
static int TAG_CANON_STATE1_UNKNOWN_8
           
static int TAG_CANON_STATE1_UNKNOWN_9
           
static int TAG_CANON_STATE2_AEB_BRACKET_VALUE
           
static int TAG_CANON_STATE2_AF_POINT_USED
           
static int TAG_CANON_STATE2_AUTO_EXPOSURE_BRACKETING
           
static int TAG_CANON_STATE2_FLASH_BIAS
          The value of this tag may be translated into a flash bias value, in EV.
static int TAG_CANON_STATE2_SEQUENCE_NUMBER
           
static int TAG_CANON_STATE2_SUBJECT_DISTANCE
           
static int TAG_CANON_STATE2_WHITE_BALANCE
          0 = Auto 1 = Sunny 2 = Cloudy 3 = Tungsten 4 = Flourescent 5 = Flash 6 = Custom
static int TAG_CANON_UNKNOWN_1
           
 
Fields inherited from class com.drew.metadata.Directory
_definedTagList, _descriptor, _tagMap
 
Constructor Summary
CanonMakernoteDirectory()
           
 
Method Summary
 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.
 void setIntArray(int tagType, int[] ints)
          We need special handling for selected tags.
 
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, 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_CANON_CAMERA_STATE_1

public static final int TAG_CANON_CAMERA_STATE_1
See Also:
Constant Field Values

TAG_CANON_CAMERA_STATE_2

public static final int TAG_CANON_CAMERA_STATE_2
See Also:
Constant Field Values

TAG_CANON_IMAGE_TYPE

public static final int TAG_CANON_IMAGE_TYPE
See Also:
Constant Field Values

TAG_CANON_FIRMWARE_VERSION

public static final int TAG_CANON_FIRMWARE_VERSION
See Also:
Constant Field Values

TAG_CANON_IMAGE_NUMBER

public static final int TAG_CANON_IMAGE_NUMBER
See Also:
Constant Field Values

TAG_CANON_OWNER_NAME

public static final int TAG_CANON_OWNER_NAME
See Also:
Constant Field Values

TAG_CANON_SERIAL_NUMBER

public static final int TAG_CANON_SERIAL_NUMBER
To display serial number as on camera use: printf( "%04X%05d", highbyte, lowbyte ) TODO handle this in CanonMakernoteDescriptor

See Also:
Constant Field Values

TAG_CANON_UNKNOWN_1

public static final int TAG_CANON_UNKNOWN_1
See Also:
Constant Field Values

TAG_CANON_CUSTOM_FUNCTIONS

public static final int TAG_CANON_CUSTOM_FUNCTIONS
See Also:
Constant Field Values

TAG_CANON_STATE1_MACRO_MODE

public static final int TAG_CANON_STATE1_MACRO_MODE
1 = Macro 2 = Normal

See Also:
Constant Field Values

TAG_CANON_STATE1_SELF_TIMER_DELAY

public static final int TAG_CANON_STATE1_SELF_TIMER_DELAY
See Also:
Constant Field Values

TAG_CANON_STATE1_QUALITY

public static final int TAG_CANON_STATE1_QUALITY
2 = Normal 3 = Fine 5 = Superfine

See Also:
Constant Field Values

TAG_CANON_STATE1_FLASH_MODE

public static final int TAG_CANON_STATE1_FLASH_MODE
0 = Flash Not Fired 1 = Auto 2 = On 3 = Red Eye Reduction 4 = Slow Synchro 5 = Auto + Red Eye Reduction 6 = On + Red Eye Reduction 16 = External Flash

See Also:
Constant Field Values

TAG_CANON_STATE1_CONTINUOUS_DRIVE_MODE

public static final int TAG_CANON_STATE1_CONTINUOUS_DRIVE_MODE
0 = Single Frame or Timer Mode 1 = Continuous

See Also:
Constant Field Values

TAG_CANON_STATE1_UNKNOWN_2

public static final int TAG_CANON_STATE1_UNKNOWN_2
See Also:
Constant Field Values

TAG_CANON_STATE1_FOCUS_MODE_1

public static final int TAG_CANON_STATE1_FOCUS_MODE_1
0 = One-Shot 1 = AI Servo 2 = AI Focus 3 = Manual Focus 4 = Single 5 = Continuous 6 = Manual Focus

See Also:
Constant Field Values

TAG_CANON_STATE1_UNKNOWN_3

public static final int TAG_CANON_STATE1_UNKNOWN_3
See Also:
Constant Field Values

TAG_CANON_STATE1_UNKNOWN_4

public static final int TAG_CANON_STATE1_UNKNOWN_4
See Also:
Constant Field Values

TAG_CANON_STATE1_IMAGE_SIZE

public static final int TAG_CANON_STATE1_IMAGE_SIZE
0 = Large 1 = Medium 2 = Small

See Also:
Constant Field Values

TAG_CANON_STATE1_EASY_SHOOTING_MODE

public static final int TAG_CANON_STATE1_EASY_SHOOTING_MODE
0 = Full Auto 1 = Manual 2 = Landscape 3 = Fast Shutter 4 = Slow Shutter 5 = Night 6 = Black & White 7 = Sepia 8 = Portrait 9 = Sports 10 = Macro / Close-Up 11 = Pan Focus

See Also:
Constant Field Values

TAG_CANON_STATE1_DIGITAL_ZOOM

public static final int TAG_CANON_STATE1_DIGITAL_ZOOM
0 = No Digital Zoom 1 = 2x 2 = 4x

See Also:
Constant Field Values

TAG_CANON_STATE1_CONTRAST

public static final int TAG_CANON_STATE1_CONTRAST
0 = Normal 1 = High 65535 = Low

See Also:
Constant Field Values

TAG_CANON_STATE1_SATURATION

public static final int TAG_CANON_STATE1_SATURATION
0 = Normal 1 = High 65535 = Low

See Also:
Constant Field Values

TAG_CANON_STATE1_SHARPNESS

public static final int TAG_CANON_STATE1_SHARPNESS
0 = Normal 1 = High 65535 = Low

See Also:
Constant Field Values

TAG_CANON_STATE1_ISO

public static final int TAG_CANON_STATE1_ISO
0 = Check ISOSpeedRatings EXIF tag for ISO Speed 15 = Auto ISO 16 = ISO 50 17 = ISO 100 18 = ISO 200 19 = ISO 400

See Also:
Constant Field Values

TAG_CANON_STATE1_METERING_MODE

public static final int TAG_CANON_STATE1_METERING_MODE
3 = Evaluative 4 = Partial 5 = Centre Weighted

See Also:
Constant Field Values

TAG_CANON_STATE1_FOCUS_TYPE

public static final int TAG_CANON_STATE1_FOCUS_TYPE
0 = Manual 1 = Auto 3 = Close-up (Macro) 8 = Locked (Pan Mode)

See Also:
Constant Field Values

TAG_CANON_STATE1_AF_POINT_SELECTED

public static final int TAG_CANON_STATE1_AF_POINT_SELECTED
12288 = None (Manual Focus) 12289 = Auto Selected 12290 = Right 12291 = Centre 12292 = Left

See Also:
Constant Field Values

TAG_CANON_STATE1_EXPOSURE_MODE

public static final int TAG_CANON_STATE1_EXPOSURE_MODE
0 = Easy Shooting (See Easy Shooting Mode) 1 = Program 2 = Tv-Priority 3 = Av-Priority 4 = Manual 5 = A-DEP

See Also:
Constant Field Values

TAG_CANON_STATE1_UNKNOWN_7

public static final int TAG_CANON_STATE1_UNKNOWN_7
See Also:
Constant Field Values

TAG_CANON_STATE1_UNKNOWN_8

public static final int TAG_CANON_STATE1_UNKNOWN_8
See Also:
Constant Field Values

TAG_CANON_STATE1_LONG_FOCAL_LENGTH

public static final int TAG_CANON_STATE1_LONG_FOCAL_LENGTH
See Also:
Constant Field Values

TAG_CANON_STATE1_SHORT_FOCAL_LENGTH

public static final int TAG_CANON_STATE1_SHORT_FOCAL_LENGTH
See Also:
Constant Field Values

TAG_CANON_STATE1_FOCAL_UNITS_PER_MM

public static final int TAG_CANON_STATE1_FOCAL_UNITS_PER_MM
See Also:
Constant Field Values

TAG_CANON_STATE1_UNKNOWN_9

public static final int TAG_CANON_STATE1_UNKNOWN_9
See Also:
Constant Field Values

TAG_CANON_STATE1_UNKNOWN_10

public static final int TAG_CANON_STATE1_UNKNOWN_10
See Also:
Constant Field Values

TAG_CANON_STATE1_FLASH_ACTIVITY

public static final int TAG_CANON_STATE1_FLASH_ACTIVITY
0 = Flash Did Not Fire 1 = Flash Fired

See Also:
Constant Field Values

TAG_CANON_STATE1_FLASH_DETAILS

public static final int TAG_CANON_STATE1_FLASH_DETAILS
See Also:
Constant Field Values

TAG_CANON_STATE1_UNKNOWN_12

public static final int TAG_CANON_STATE1_UNKNOWN_12
See Also:
Constant Field Values

TAG_CANON_STATE1_UNKNOWN_13

public static final int TAG_CANON_STATE1_UNKNOWN_13
See Also:
Constant Field Values

TAG_CANON_STATE1_FOCUS_MODE_2

public static final int TAG_CANON_STATE1_FOCUS_MODE_2
0 = Focus Mode: Single 1 = Focus Mode: Continuous

See Also:
Constant Field Values

TAG_CANON_STATE2_WHITE_BALANCE

public static final int TAG_CANON_STATE2_WHITE_BALANCE
0 = Auto 1 = Sunny 2 = Cloudy 3 = Tungsten 4 = Flourescent 5 = Flash 6 = Custom

See Also:
Constant Field Values

TAG_CANON_STATE2_SEQUENCE_NUMBER

public static final int TAG_CANON_STATE2_SEQUENCE_NUMBER
See Also:
Constant Field Values

TAG_CANON_STATE2_AF_POINT_USED

public static final int TAG_CANON_STATE2_AF_POINT_USED
See Also:
Constant Field Values

TAG_CANON_STATE2_FLASH_BIAS

public static final int TAG_CANON_STATE2_FLASH_BIAS
The value of this tag may be translated into a flash bias value, in EV. 0xffc0 = -2 EV 0xffcc = -1.67 EV 0xffd0 = -1.5 EV 0xffd4 = -1.33 EV 0xffe0 = -1 EV 0xffec = -0.67 EV 0xfff0 = -0.5 EV 0xfff4 = -0.33 EV 0x0000 = 0 EV 0x000c = 0.33 EV 0x0010 = 0.5 EV 0x0014 = 0.67 EV 0x0020 = 1 EV 0x002c = 1.33 EV 0x0030 = 1.5 EV 0x0034 = 1.67 EV 0x0040 = 2 EV

See Also:
Constant Field Values

TAG_CANON_STATE2_AUTO_EXPOSURE_BRACKETING

public static final int TAG_CANON_STATE2_AUTO_EXPOSURE_BRACKETING
See Also:
Constant Field Values

TAG_CANON_STATE2_AEB_BRACKET_VALUE

public static final int TAG_CANON_STATE2_AEB_BRACKET_VALUE
See Also:
Constant Field Values

TAG_CANON_STATE2_SUBJECT_DISTANCE

public static final int TAG_CANON_STATE2_SUBJECT_DISTANCE
See Also:
Constant Field Values

TAG_CANON_CUSTOM_FUNCTION_LONG_EXPOSURE_NOISE_REDUCTION

public static final int TAG_CANON_CUSTOM_FUNCTION_LONG_EXPOSURE_NOISE_REDUCTION
Long Exposure Noise Reduction 0 = Off 1 = On

See Also:
Constant Field Values

TAG_CANON_CUSTOM_FUNCTION_SHUTTER_AUTO_EXPOSURE_LOCK_BUTTONS

public static final int TAG_CANON_CUSTOM_FUNCTION_SHUTTER_AUTO_EXPOSURE_LOCK_BUTTONS
Shutter/Auto Exposure-lock buttons 0 = AF/AE lock 1 = AE lock/AF 2 = AF/AF lock 3 = AE+release/AE+AF

See Also:
Constant Field Values

TAG_CANON_CUSTOM_FUNCTION_MIRROR_LOCKUP

public static final int TAG_CANON_CUSTOM_FUNCTION_MIRROR_LOCKUP
Mirror lockup 0 = Disable 1 = Enable

See Also:
Constant Field Values

TAG_CANON_CUSTOM_FUNCTION_TV_AV_AND_EXPOSURE_LEVEL

public static final int TAG_CANON_CUSTOM_FUNCTION_TV_AV_AND_EXPOSURE_LEVEL
Tv/Av and exposure level 0 = 1/2 stop 1 = 1/3 stop

See Also:
Constant Field Values

TAG_CANON_CUSTOM_FUNCTION_AF_ASSIST_LIGHT

public static final int TAG_CANON_CUSTOM_FUNCTION_AF_ASSIST_LIGHT
AF-assist light 0 = On (Auto) 1 = Off

See Also:
Constant Field Values

TAG_CANON_CUSTOM_FUNCTION_SHUTTER_SPEED_IN_AV_MODE

public static final int TAG_CANON_CUSTOM_FUNCTION_SHUTTER_SPEED_IN_AV_MODE
Shutter speed in Av mode 0 = Automatic 1 = 1/200 (fixed)

See Also:
Constant Field Values

TAG_CANON_CUSTOM_FUNCTION_BRACKETTING

public static final int TAG_CANON_CUSTOM_FUNCTION_BRACKETTING
Auto-Exposure Bracketting sequence/auto cancellation 0 = 0,-,+ / Enabled 1 = 0,-,+ / Disabled 2 = -,0,+ / Enabled 3 = -,0,+ / Disabled

See Also:
Constant Field Values

TAG_CANON_CUSTOM_FUNCTION_SHUTTER_CURTAIN_SYNC

public static final int TAG_CANON_CUSTOM_FUNCTION_SHUTTER_CURTAIN_SYNC
Shutter Curtain Sync 0 = 1st Curtain Sync 1 = 2nd Curtain Sync

See Also:
Constant Field Values

TAG_CANON_CUSTOM_FUNCTION_AF_STOP

public static final int TAG_CANON_CUSTOM_FUNCTION_AF_STOP
Lens Auto-Focus stop button Function Switch 0 = AF stop 1 = Operate AF 2 = Lock AE and start timer

See Also:
Constant Field Values

TAG_CANON_CUSTOM_FUNCTION_FILL_FLASH_REDUCTION

public static final int TAG_CANON_CUSTOM_FUNCTION_FILL_FLASH_REDUCTION
Auto reduction of fill flash 0 = Enable 1 = Disable

See Also:
Constant Field Values

TAG_CANON_CUSTOM_FUNCTION_MENU_BUTTON_RETURN

public static final int TAG_CANON_CUSTOM_FUNCTION_MENU_BUTTON_RETURN
Menu button return position 0 = Top 1 = Previous (volatile) 2 = Previous

See Also:
Constant Field Values

TAG_CANON_CUSTOM_FUNCTION_SET_BUTTON_FUNCTION

public static final int TAG_CANON_CUSTOM_FUNCTION_SET_BUTTON_FUNCTION
SET button function when shooting 0 = Not Assigned 1 = Change Quality 2 = Change ISO Speed 3 = Select Parameters

See Also:
Constant Field Values

TAG_CANON_CUSTOM_FUNCTION_SENSOR_CLEANING

public static final int TAG_CANON_CUSTOM_FUNCTION_SENSOR_CLEANING
Sensor cleaning 0 = Disable 1 = Enable

See Also:
Constant Field Values

_tagNameMap

protected static final HashMap _tagNameMap
Constructor Detail

CanonMakernoteDirectory

public CanonMakernoteDirectory()
Method Detail

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

setIntArray

public void setIntArray(int tagType,
                        int[] ints)
We need special handling for selected tags.

Overrides:
setIntArray in class Directory
Parameters:
tagType -
ints -