From 1abee6471faf18e65d9299fdc1861109fb6603bb Mon Sep 17 00:00:00 2001 From: Christian Fowler Date: Thu, 2 Aug 2007 02:41:48 +0000 Subject: commit version 1.11, most recent add time of add --- jpeg_metadata_tk/Makernotes/Pentax.php | 353 ++++++++++++ jpeg_metadata_tk/Makernotes/agfa.php | 117 ++++ jpeg_metadata_tk/Makernotes/canon.php | 748 +++++++++++++++++++++++++ jpeg_metadata_tk/Makernotes/casio.php | 575 +++++++++++++++++++ jpeg_metadata_tk/Makernotes/epson.php | 119 ++++ jpeg_metadata_tk/Makernotes/fujifilm.php | 344 ++++++++++++ jpeg_metadata_tk/Makernotes/konica_minolta.php | 745 ++++++++++++++++++++++++ jpeg_metadata_tk/Makernotes/kyocera.php | 241 ++++++++ jpeg_metadata_tk/Makernotes/nikon.php | 731 ++++++++++++++++++++++++ jpeg_metadata_tk/Makernotes/olympus.php | 486 ++++++++++++++++ jpeg_metadata_tk/Makernotes/panasonic.php | 292 ++++++++++ jpeg_metadata_tk/Makernotes/ricoh.php | 415 ++++++++++++++ jpeg_metadata_tk/Makernotes/sony.php | 244 ++++++++ 13 files changed, 5410 insertions(+) create mode 100644 jpeg_metadata_tk/Makernotes/Pentax.php create mode 100644 jpeg_metadata_tk/Makernotes/agfa.php create mode 100644 jpeg_metadata_tk/Makernotes/canon.php create mode 100644 jpeg_metadata_tk/Makernotes/casio.php create mode 100644 jpeg_metadata_tk/Makernotes/epson.php create mode 100644 jpeg_metadata_tk/Makernotes/fujifilm.php create mode 100644 jpeg_metadata_tk/Makernotes/konica_minolta.php create mode 100644 jpeg_metadata_tk/Makernotes/kyocera.php create mode 100644 jpeg_metadata_tk/Makernotes/nikon.php create mode 100644 jpeg_metadata_tk/Makernotes/olympus.php create mode 100644 jpeg_metadata_tk/Makernotes/panasonic.php create mode 100644 jpeg_metadata_tk/Makernotes/ricoh.php create mode 100644 jpeg_metadata_tk/Makernotes/sony.php (limited to 'jpeg_metadata_tk/Makernotes') diff --git a/jpeg_metadata_tk/Makernotes/Pentax.php b/jpeg_metadata_tk/Makernotes/Pentax.php new file mode 100644 index 0000000..10194a6 --- /dev/null +++ b/jpeg_metadata_tk/Makernotes/Pentax.php @@ -0,0 +1,353 @@ + array( 'Name' => "Capture Mode", + 'Type' => "Lookup", + 0 => "Auto", + 1 => "Night-scene", + 2 => "Manual", + 4 => "Multiple" ), + +0x0002 => array( 'Name' => "Quality Level", + 'Type' => "Lookup", + 0 => "Good", + 1 => "Better", + 2 => "Best" ), + +0x0003 => array( 'Name' => "Focus Mode", + 'Type' => "Lookup", + 2 => "Custom", + 3 => "Auto" ), + +0x0004 => array( 'Name' => "Flash Mode", + 'Type' => "Lookup", + 1 => "Auto", + 2 => "Flash on", + 4 => "Flash off", + 6 => "Red-eye Reduction" ), + +0x0007 => array( 'Name' => "White Balance", + 'Type' => "Lookup", + 0 => "Auto", + 1 => "Daylight", + 2 => "Shade", + 3 => "Tungsten", + 4 => "Fluorescent", + 5 => "Manual" ), + + +0x000a => array( 'Name' => "Digital Zoom", + 'Type' => "Numeric", + 'Units' => " (0 = Off)" ), + +0x000b => array( 'Name' => "Sharpness", + 'Type' => "Lookup", + 0 => "Normal", + 1 => "Soft", + 2 => "Hard" ), + +0x000c => array( 'Name' => "Contrast", + 'Type' => "Lookup", + 0 => "Normal", + 1 => "Low", + 2 => "High" ), + +0x000d => array( 'Name' => "Saturation", + 'Type' => "Lookup", + 0 => "Normal", + 1 => "Low", + 2 => "High" ), + +0x0014 => array( 'Name' => "ISO Speed", + 'Type' => "Lookup", + 10 => "100", + 16 => "200", + 100 => "100", + 200 => "200" ), + +0x0017 => array( 'Name' => "Colour", + 'Type' => "Lookup", + 1 => "Normal", + 2 => "Black & White", + 3 => "Sepia" ), + +0x0e00 => array( 'Name' => "Print Image Matching Info", + 'Type' => "PIM" ), + +0x1000 => array( 'Name' => "Time Zone", + 'Type' => "String" ), + +0x1001 => array( 'Name' => "Daylight Savings", + 'Type' => "String" ), + + + + + +); + +/****************************************************************************** +* End of Global Variable: IFD_Tag_Definitions, Pentax +******************************************************************************/ + + + +?> diff --git a/jpeg_metadata_tk/Makernotes/agfa.php b/jpeg_metadata_tk/Makernotes/agfa.php new file mode 100644 index 0000000..214c70d --- /dev/null +++ b/jpeg_metadata_tk/Makernotes/agfa.php @@ -0,0 +1,117 @@ + diff --git a/jpeg_metadata_tk/Makernotes/canon.php b/jpeg_metadata_tk/Makernotes/canon.php new file mode 100644 index 0000000..a261506 --- /dev/null +++ b/jpeg_metadata_tk/Makernotes/canon.php @@ -0,0 +1,748 @@ + $value ) + { + // Check that the value exists + if ( $value !== NULL ) + { + // Process the settings according to their offset + if ( $offset == 0 ) + { + // Do Not Show this Field ( Number of Bytes in Tag ) + } + else if ( $offset == 2 ) + { + if ( $value == 0 ) + { + $output_str .= "Self timer not used\n"; + } + else + { + $output_str .= "Self timer length : ". ($value/10) . " seconds\n"; + } + } + else if ( ( $offset == 23 ) && ( $Exif_Tag['Data'][25] != 0 )) + { + $output_str .= "Maximum Focal Length of Lens: " . ($value / $Exif_Tag['Data'][25]) . "mm\n"; + } + else if ( ( $offset == 24 ) && ( $Exif_Tag['Data'][25] != 0 )) + { + $output_str .= "Minimum Focal Length of Lens: " . ($value / $Exif_Tag['Data'][25]) . "mm\n"; + } + else if ( $offset == 25 ) + { + // Do Not Show this Field ( Focal Length units per mm ) + } + else if ( $offset == 29 ) + { + if ( $value & 0x4000 == 0x4000 ) + { + $output_str .= "External E-TTL Flash\n"; + } + if ( $value & 0x2000 == 0x2000 ) + { + $output_str .= "Internal Flash\n"; + } + if ( $value & 0x0800 == 0x0800 ) + { + $output_str .= "Flash FP sync used\n"; + } + if ( $value & 0x0080 == 0x0080 ) + { + $output_str .= "Second (Rear) curtain flash sync used\n"; + } + if ( $value & 0x0008 == 0x0008 ) + { + $output_str .= "Flash FP sync enabled\n"; + } + + } + else if ( array_key_exists( $offset, $GLOBALS[ "Canon_Camera_Settings_1_Tag_Values" ] ) ) + { + if ( array_key_exists( $value, $GLOBALS[ "Canon_Camera_Settings_1_Tag_Values" ][$offset] ) ) + { + $output_str .= $GLOBALS[ "Canon_Camera_Settings_1_Tag_Values" ][$offset]['Name'] . ": " . $GLOBALS[ "Canon_Camera_Settings_1_Tag_Values" ][$offset][$value] . "\n"; + } + else + { + if ( $GLOBALS['HIDE_UNKNOWN_TAGS'] == FALSE ) + { + $output_str .= $GLOBALS[ "Canon_Camera_Settings_1_Tag_Values" ][$offset]['Name'] . ": Unknown Value ($value)\n"; + } + } + } + else + { + if ( $GLOBALS['HIDE_UNKNOWN_TAGS'] == FALSE ) + { + // Unknown Canon camera setting + $output_str .= " Unknown Setting ($offset), value: $value\n"; + } + } + } + + } + // Return the text string + return $output_str; + break; + + + // CAMERA SETTINGS 2 + case 4: + // Create an output string + $output_str = ""; + + // Cycle through each of the camera settings Values + foreach( $Exif_Tag['Data'] as $offset => $value ) + { + // Check that the value exists + if ( $value !== NULL ) + { + // Process the settings according to their offset + if ( $offset == 0 ) + { + // Do Not Show this Field ( Number of Bytes in Tag ) + } + else if ( $offset == 9 ) + { + $output_str .= "Sequence Number in a continuous burst : $value\n"; + } + else if ( $offset == 14 ) + { + $output_str .= "Number of Focus Points Available: ". ( ( $value & 0xF000 ) / 0x1000 ) . "\n"; + + if ( $value & 0x0004 == 0x0004 ) + { + $output_str .= "Left Focus Point Used\n"; + } + if ( $value & 0x0002 == 0x0002 ) + { + $output_str .= "Centre Focus Point Used\n"; + } + if ( $value & 0x0001 == 0x0001 ) + { + $output_str .= "Right Focus Point Used\n"; + } + } + else if ( $offset == 19 ) + { + $output_str .= "Subject distance: $value (units either mm or cm)\n"; + } + else if ( array_key_exists( $offset, $GLOBALS[ "Canon_Camera_Settings_2_Tag_Values" ] ) ) + { + if ( array_key_exists( $value, $GLOBALS[ "Canon_Camera_Settings_2_Tag_Values" ][$offset] ) ) + { + $output_str .= $GLOBALS[ "Canon_Camera_Settings_2_Tag_Values" ][$offset]['Name'] . ": " . $GLOBALS[ "Canon_Camera_Settings_2_Tag_Values" ][$offset][$value] . "\n"; + } + else + { + if ( $GLOBALS['HIDE_UNKNOWN_TAGS'] == FALSE ) + { + $output_str .= $GLOBALS[ "Canon_Camera_Settings_2_Tag_Values" ][$offset]['Name'] . ": Unknown Value ($value)\n"; + } + } + } + else + { + if ( $GLOBALS['HIDE_UNKNOWN_TAGS'] == FALSE ) + { + $output_str .= " Unknown Setting ($offset), value: $value\n"; + } + } + } + + } + // Return the text string + return $output_str; + break; + + + // Serial Number + case 12: + $output_str = sprintf ( "%04X%05d", (($Exif_Tag['Data'][0] & 0xFF00)/256), ($Exif_Tag['Data'][0] & 0x00FF) ); + break; + + + // Custom Functions + case 15: + // Create an output string + $output_str = ""; + + // The size element is the first of the value array + // get rid of it + $tmparray = $Exif_Tag['Data']; + array_shift ( $tmparray ); + + // Cycle through each of the custom functions + foreach( $tmparray as $valorder => $value ) + { + // Figure out the function number and value + $funcno = ( $value & 0xFF00 ) / 256; + $funcval = $value & 0x00FF; + + // Check if the function exists in the lookup table of custom functions + if ( array_key_exists( $funcno, $GLOBALS[ "Canon_Custom_Functions_Tag_Values" ] ) ) + { + // Function Exists in lookup table, + // Check if value exists for this function in the lookup table + if ( array_key_exists( $funcval, $GLOBALS[ "Canon_Custom_Functions_Tag_Values" ][$funcno] ) ) + { + // Value exists - Add it to the output text + $output_str .= $GLOBALS[ "Canon_Custom_Functions_Tag_Values" ][$funcno]['Name'] . ": " . $GLOBALS[ "Canon_Custom_Functions_Tag_Values" ][$funcno][$funcval] . "\n"; + } + else + { + if ( $GLOBALS['HIDE_UNKNOWN_TAGS'] == FALSE ) + { + // Value doesn't exist - Add a message to the output text + $output_str .= $GLOBALS[ "Canon_Custom_Functions_Tag_Values" ][$funcno]['Name'] . ": Unknown Value ($value)\n"; + } + } + } + else + { + if ( $GLOBALS['HIDE_UNKNOWN_TAGS'] == FALSE ) + { + // Function doesn't exist in lookup table - add a message to the output text + $output_str .= "Unknown Custom Function ($funcno), value: $funcval\n"; + } + } + } + // Return the resulting string + return $output_str; + break; + + default : + return FALSE; + } + + return FALSE; +} + +/****************************************************************************** +* End of Function: get_Canon_Text_Value +******************************************************************************/ + + + + + + + + + + + + + + + + +/****************************************************************************** +* Global Variable: IFD_Tag_Definitions, Canon +* +* Contents: This global variable provides definitions of the known Canon +* Makernote tags, indexed by their tag number. +* +******************************************************************************/ + +$GLOBALS[ "IFD_Tag_Definitions" ]['Canon'] = array( + +1 => array( 'Name' => "Camera Settings 1", + 'Type' => "Special" ), + +4 => array( 'Name' => "Camera Settings 2", + 'Type' => "Special" ), + +6 => array( 'Name' => "Image Type", + 'Type' => "String" ), + +7 => array( 'Name' => "Firmware Version", + 'Type' => "String" ), + +8 => array( 'Name' => "Image Number", + 'Type' => "Numeric" ), + +9 => array( 'Name' => "Owner Name", + 'Type' => "String" ), + +12 => array( 'Name' => "Camera Serial Number", + 'Type' => "Special" ), + +15 => array( 'Name' => "Custom Functions", + 'Type' => "Special" ) + +); + + +/****************************************************************************** +* End of Global Variable: IFD_Tag_Definitions, Canon +******************************************************************************/ + + + + + + + + + + + + + + + + + + +/****************************************************************************** +* Global Variable: Canon_Camera_Settings_1_Tag_Values +* +* Contents: This global variable provides definitions for the Canon Camera +* Settings 1 Makernote tag, indexed by their offset. +* +******************************************************************************/ + +$GLOBALS[ "Canon_Camera_Settings_1_Tag_Values" ] = array( + +1 => array( 'Name' => "Macro Mode", + 1 => "Macro", + 2 => "Normal ( Not Macro )" ), + +3 => array( 'Name' => "Quality", + 2 => "Normal", + 3 => "Fine", + 5 => "Superfine" ), + +4 => array( 'Name' => "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" ), + +5 => array( 'Name' => "Continuous drive mode", + 0 => "Single Frame or Timer Mode", + 1 => "Continuous" ), + +7 => array( 'Name' => "Focus Mode", + 0 => "One-Shot", + 1 => "AI Servo", + 2 => "AI Focus", + 3 => "Manual Focus", + 4 => "Single", + 5 => "Continuous", + 6 => "Manual Focus" ), + +10 => array( 'Name' => "Image Size", + 0 => "Large", + 1 => "Medium", + 2 => "Small" ), + +11 => array( 'Name' => "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" ), + + +12 => array( 'Name' => "Digital Zoom", + 0 => "No Digital Zoom", + 1 => "2x", + 2 => "4x" ), + +13 => array( 'Name' => "Contrast", + 0 => "Normal", + 1 => "High", + 65535 => "Low" ), + +14 => array( 'Name' => "Saturation", + 0 => "Normal", + 1 => "High", + 65535 => "Low" ), + +15 => array( 'Name' => "Sharpness", + 0 => "Normal", + 1 => "High", + 65535 => "Low" ), + +16 => array( 'Name' => "ISO Speed", + 0 => "Check ISOSpeedRatings EXIF tag for ISO Speed", + 15 => "Auto ISO", + 16 => "ISO 50", + 17 => "ISO 100", + 18 => "ISO 200", + 19 => "ISO 400" ), + +17 => array( 'Name' => "Metering Mode", + 3 => "Evaluative", + 4 => "Partial", + 5 => "Centre Weighted" ), + +18 => array( 'Name' => "Focus Type", + 0 => "Manual", + 1 => "Auto", + 3 => "Close-up (Macro)", + 8 => "Locked (Pan Mode)" ), + +19 => array( 'Name' => "Auto Focus Point Selected", + 12288 => "None (Manual Focus)", + 12289 => "Auto Selected", + 12290 => "Right", + 12291 => "Centre", + 12292 => "Left" ), + +20 => array( 'Name' => "Exposure Mode", + 0 => "Easy Shooting (See Easy Shooting Mode)", + 1 => "Program", + 2 => "Tv-Priority", + 3 => "Av-Priority", + 4 => "Manual", + 5 => "A-DEP" ), + +28 => array( 'Name' => "Flash Activity", + 0 => "Flash Did Not Fire", + 1 => "Flash Fired" ), + +32 => array( 'Name' => "Focus Mode", + 0 => "Focus Mode: Single", + 1 => "Focus Mode: Continuous" ) + +); + +/****************************************************************************** +* End of Global Variable: Canon_Camera_Settings_1_Tag_Values +******************************************************************************/ + + + + +/****************************************************************************** +* Global Variable: Canon_Camera_Settings_2_Tag_Values +* +* Contents: This global variable provides definitions for the Canon Camera +* Settings 2 Makernote tag, indexed by their offset. +* +******************************************************************************/ + +$GLOBALS[ "Canon_Camera_Settings_2_Tag_Values" ] = array( + +7 => array ( 'Name' => "White Balance", + 0 => "Auto", + 1 => "Sunny", + 2 => "Cloudy", + 3 => "Tungsten", + 4 => "Flourescent", + 5 => "Flash", + 6 => "Custom" ), + +15 => array( 'Name' => "Flash Bias", + 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" ), +); + +/****************************************************************************** +* End of Global Variable: Canon_Camera_Settings_2_Tag_Values +******************************************************************************/ + + + + + + +/****************************************************************************** +* Global Variable: Canon_Custom_Functions_Tag_Values +* +* Contents: This global variable provides definitions for the Canon Custom +* Functions Makernote tag, indexed by their offset. +* +******************************************************************************/ + +$GLOBALS[ "Canon_Custom_Functions_Tag_Values" ] = array( + +1 => array ( 'Name' => "Long Exposure Noise Reduction", + 0 => "Off", + 1 => "On" ), + +2 => array ( 'Name' => "Shutter/Auto Exposure-lock buttons", + 0 => "AF/AE lock", + 1 => "AE lock/AF", + 2 => "AF/AF lock", + 3 => "AE+release/AE+AF" ), + +3 => array ( 'Name' => "Mirror lockup", + 0 => "Disable", + 1 => "Enable" ), + +4 => array ( 'Name' => "Tv/Av and exposure level", + 0 => "1/2 stop", + 1 => "1/3 stop" ), + +5 => array ( 'Name' => "AF-assist light", + 0 => "On (Auto)", + 1 => "Off" ), + +6 => array ( 'Name' => "Shutter speed in Av mode", + 0 => "Automatic", + 1 => "1/200 (fixed)" ), + +7 => array ( 'Name' => "Auto-Exposure Bracketting sequence/auto cancellation", + 0 => "0,-,+ / Enabled", + 1 => "0,-,+ / Disabled", + 2 => "-,0,+ / Enabled", + 3 => "-,0,+ / Disabled" ), + +8 => array ( 'Name' => "Shutter Curtain Sync", + 0 => "1st Curtain Sync", + 1 => "2nd Curtain Sync" ), + +9 => array ( 'Name' => "Lens Auto-Focus stop button Function Switch", + 0 => "AF stop", + 1 => "Operate AF", + 2 => "Lock AE and start timer" ), + +10 => array ( 'Name' => "Auto reduction of fill flash", + 0 => "Enable", + 1 => "Disable" ), + +11 => array ( 'Name' => "Menu button return position", + 0 => "Top", + 1 => "Previous (volatile)", + 2 => "Previous" ), + +12 => array ( 'Name' => "SET button function when shooting", + 0 => "Not Assigned", + 1 => "Change Quality", + 2 => "Change ISO Speed", + 3 => "Select Parameters" ), + +13 => array ( 'Name' => "Sensor cleaning", + 0 => "Disable", + 1 => "Enable" ) + + +); + +/****************************************************************************** +* End of Global Variable: Canon_Custom_Functions_Tag_Values +******************************************************************************/ + + +?> diff --git a/jpeg_metadata_tk/Makernotes/casio.php b/jpeg_metadata_tk/Makernotes/casio.php new file mode 100644 index 0000000..d1cd74e --- /dev/null +++ b/jpeg_metadata_tk/Makernotes/casio.php @@ -0,0 +1,575 @@ + 1.11 : changed get_Casio_Makernote_Html to allow thumbnail links to work when +* toolkit is portable across directories +* +* URL: http://electronics.ozhiker.com +* +* Copyright: Copyright Evan Hunter 2004 +* This file may be used freely for non-commercial purposes.For +* commercial uses please contact the author: evan@ozhiker.com +* +******************************************************************************/ + + +// Add the parser and interpreter functions to the list of Makernote parsers and interpreters. + +$GLOBALS['Makernote_Function_Array']['Read_Makernote_Tag'][] = "get_Casio_Makernote"; +$GLOBALS['Makernote_Function_Array']['get_Makernote_Text_Value'][] = "get_Casio_Text_Value"; +$GLOBALS['Makernote_Function_Array']['Interpret_Makernote_to_HTML'][] = "get_Casio_Makernote_Html"; + +include_once dirname(__FILE__) .'/../pjmt_utils.php'; // Change: as of version 1.11 - added to allow directory portability + + +/****************************************************************************** +* +* Function: get_Casio_Makernote +* +* Description: Decodes the Makernote tag and returns the new tag with the decoded +* information attached. Returns false if this is not a makernote +* that can be processed with this script +* +* Parameters: Makernote_Tag - the element of an EXIF array containing the +* makernote, as returned from get_EXIF_JPEG +* EXIF_Array - the entire EXIF array containing the +* makernote, as returned from get_EXIF_JPEG, in +* case more information is required for decoding +* filehnd - an open file handle for the file containing the +* makernote - does not have to be positioned at the +* start of the makernote +* Make_Field - The contents of the EXIF Make field, to aid +* determining whether this script can decode +* the makernote +* +* +* Returns: Makernote_Tag - the Makernote_Tag from the parameters, but +* modified to contain the decoded information +* FALSE - If this script could not decode the makernote, or if +* an error occured in decoding +* +******************************************************************************/ + +function get_Casio_Makernote( $Makernote_Tag, $EXIF_Array, $filehnd, $Make_Field ) +{ + + // Check if the Make Field contains the word Casio + if ( stristr( $Make_Field, "Casio" ) === FALSE ) + { + return FALSE; + } + + + if ( substr( $Makernote_Tag['Data'],0 , 6 ) == "QVC\x00\x00\x00" ) + { + + // Seek to the start of the IFD + fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset'] + 6 ); + + $Makernote_Tag['ByteAlign'] = "MM"; + + // Read the IFD(s) into an array + $Makernote_Tag['Decoded Data'] = read_Multiple_IFDs( $filehnd, $Makernote_Tag['Tiff Offset'], $Makernote_Tag['ByteAlign'], "Casio Type 2" ); + + // Save some information into the Tag element to aid interpretation + $Makernote_Tag['Decoded'] = TRUE; + $Makernote_Tag['Makernote Type'] = "Casio Type 2"; + $Makernote_Tag['Makernote Tags'] = "Casio Type 2"; + + // Return the new tag + return $Makernote_Tag; + } + else + { + // Seek to the start of the IFD + fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset'] + 0 ); + + $Makernote_Tag['ByteAlign'] = "MM"; + + // Read the IFD(s) into an array + $Makernote_Tag['Decoded Data'] = read_Multiple_IFDs( $filehnd, $Makernote_Tag['Tiff Offset'], $Makernote_Tag['ByteAlign'], "Casio Type 1" ); + + // Save some information into the Tag element to aid interpretation + $Makernote_Tag['Decoded'] = TRUE; + $Makernote_Tag['Makernote Type'] = "Casio Type 1"; + $Makernote_Tag['Makernote Tags'] = "Casio Type 1"; + + // Return the new tag + return $Makernote_Tag; + } +} + +/****************************************************************************** +* End of Function: get_Casio_Makernote +******************************************************************************/ + + + + +/****************************************************************************** +* +* Function: get_Casio_Text_Value +* +* Description: Provides a text value for any tag marked as special for makernotes +* that this script can decode. Returns false if this is not a makernote +* that can be processed with this script +* +* Parameters: Exif_Tag - the element of an the Makernote array containing the +* tag in question, as returned from get_Casio_Makernote +* Tag_Definitions_Name - The name of the Tag Definitions group +* within the global array IFD_Tag_Definitions +* +* +* Returns: output - the text value for the tag +* FALSE - If this script could not decode the makernote, or if +* an error occured in decoding +* +******************************************************************************/ + +function get_Casio_Text_Value( $Exif_Tag, $Tag_Definitions_Name ) +{ + + // Check that this tag uses the Casio tag definitions, otherwise it can't be decoded here + if ( $Tag_Definitions_Name == "Casio Type 2" ) + { + // Tag Uses Casio Type 2 Tag definitions + // Process the tag according to it's tag number + if ( $Exif_Tag['Tag Number'] == 0x001D ) + { + return $Exif_Tag['Data'][0]/10 . $Exif_Tag['Units']; + } + else + { + return FALSE; + } + } + else if ( $Tag_Definitions_Name == "Casio Type 1" ) + { + // Tag Uses Casio Type 1 Tags + return FALSE; + } + else + { + // Tag does NOT use Casio Tag definitions + return FALSE; + } + + // Shouldn't get here + return FALSE; + +} + +/****************************************************************************** +* End of Function: get_Casio_Text_Value +******************************************************************************/ + + + + + + + +/****************************************************************************** +* +* Function: get_Casio_Makernote_Html +* +* Description: Attempts to interpret a makernote into html. Returns false if +* it is not a makernote that can be processed with this script +* +* Parameters: Makernote_Tag - the element of an EXIF array containing the +* makernote, as returned from get_EXIF_JPEG +* filename - the name of the JPEG file being processed ( used +* by scripts which display embedded thumbnails) +* +* +* Returns: output - the html representing the makernote +* FALSE - If this script could not interpret the makernote, or if +* an error occured in decoding +* +******************************************************************************/ + +function get_Casio_Makernote_Html( $Makernote_tag, $filename ) +{ + // Check that this tag uses the Casio tags, otherwise it can't be interpreted here + if ( ( $Makernote_tag['Makernote Type'] != "Casio Type 1" ) && + ( $Makernote_tag['Makernote Type'] != "Casio Type 2" ) ) + { + // Not Casio tags - can't interpret with this function + return FALSE; + } + + // Casio Thumbnail (Tag 4) + if ( ( array_key_exists( 4, $Makernote_tag['Decoded Data'][0] ) ) && + ( $Makernote_tag['Makernote Tags'] == "Casio Type 2" ) ) + { + // Change: as of version 1.11 - Changed to make thumbnail link portable across directories + // Build the path of the thumbnail script and its filename parameter to put in a url + $link_str = get_relative_path( dirname(__FILE__) . "/get_casio_thumb.php" , getcwd ( ) ); + $link_str .= "?filename="; + $link_str .= get_relative_path( $filename, dirname(__FILE__) ); + + // Add thumbnail link to html + $Makernote_tag['Decoded Data'][0][4]['Text Value'] = "\n"; + $Makernote_tag['Decoded Data'][0][4]['Type'] = "String"; + } + + + // Casio Thumbnail (Tag 8192) + if ( ( array_key_exists( 8192, $Makernote_tag['Decoded Data'][0] ) ) && + ( $Makernote_tag['Makernote Tags'] == "Casio Type 2" ) ) + { + // Change: as of version 1.11 - Changed to make thumbnail link portable across directories + // Build the path of the thumbnail script and its filename parameter to put in a url + $link_str = get_relative_path( dirname(__FILE__) . "/.." . "/get_casio_thumb.php" , getcwd ( ) ); + $link_str .= "?filename="; + $link_str .= get_relative_path( $filename, dirname(__FILE__) . "/.." ); + + // Add thumbnail link to html + $Makernote_tag['Decoded Data'][0][8192]['Text Value'] = "\n"; + $Makernote_tag['Decoded Data'][0][8192]['Type'] = "String"; + } + + + // Check if there are two thumbnail offset tags + if ( ( array_key_exists( 4, $Makernote_tag['Decoded Data'][0] ) ) && + ( array_key_exists( 8192, $Makernote_tag['Decoded Data'][0] ) ) ) + { + // There are two copies of the thumbnail offset - Remove one + array_splice( $Makernote_tag['Decoded Data'][0], 4, 1); + } + + + // Interpret the IFD and return the html + return interpret_IFD( $Makernote_tag['Decoded Data'][0], $filename ); + +} + +/****************************************************************************** +* End of Function: get_Casio_Makernote_Html +******************************************************************************/ + + + + + + +/****************************************************************************** +* Global Variable: IFD_Tag_Definitions, Casio Type 1 +* +* Contents: This global variable provides definitions of the known Casio Type 1 +* Makernote tags, indexed by their tag number. +* +******************************************************************************/ + + +$GLOBALS[ "IFD_Tag_Definitions" ]["Casio Type 1"] = array( + +1 => array( 'Name' => "Recording Mode", + 'Type' => "Lookup", + 1 => "Single Shutter", + 2 => "Panorama", + 3 => "Night Scene", + 4 => "Portrait", + 5 => "Landscape" ), + +2 => array( 'Name' => "Quality", + 'Type' => "Lookup", + 1 => "Economy", + 2 => "Normal", + 3 => "Fine" ), + +3 => array( 'Name' => "Focusing Mode", + 'Type' => "Lookup", + 2 => "Macro", + 3 => "Auto Focus", + 4 => "Manual Focus", + 5 => "Infinity" ), + +4 => array( 'Name' => "Flash Mode", + 'Type' => "Lookup", + 1 => "Auto", + 2 => "On", + 3 => "Off", + 4 => "Off" ), + +5 => array( 'Name' => "Flash Intensity", + 'Type' => "Lookup", + 11 => "Weak", + 13 => "Normal", + 15 => "Strong" ), + +6 => array( 'Name' => "Object Distance", + 'Type' => "Numeric", + 'Units' => "mm" ), + +7 => array( 'Name' => "White Balance", + 'Type' => "Lookup", + 1 => "Auto", + 2 => "Tungsten", + 3 => "Daylight", + 4 => "Flourescent", + 5 => "Shade", + 129 => "Manual" ), + +10 => array( 'Name' => "Digital Zoom", + 'Type' => "Lookup", + 0x10000 => "Off", + 0x10001 => "2x Digital Zoom", + 0x20000 => "2x Digital Zoom", + 0x40000 => "4x Digital Zoom" ), + +11 => array( 'Name' => "Sharpness", + 'Type' => "Lookup", + 0 => "Normal", + 1 => "Soft", + 2 => "Hard" ), + +12 => array( 'Name' => "Contrast", + 'Type' => "Lookup", + 0 => "Normal", + 1 => "Low", + 2 => "High" ), + +13 => array( 'Name' => "Saturation", + 'Type' => "Lookup", + 0 => "Normal", + 1 => "Low", + 2 => "High" ), + +20 => array( 'Name' => "CCD Sensitivity", + 'Type' => "Lookup", + 64 => "Normal", + 125 => "+1.0", + 250 => "+2.0", + 244 => "+3.0", + 80 => "Normal (ISO 80 equivalent)", + 100 => "High" ), + +); + +/****************************************************************************** +* End of Global Variable: IFD_Tag_Definitions, Casio Type 1 +******************************************************************************/ + + + + + + +/****************************************************************************** +* Global Variable: IFD_Tag_Definitions, Casio Type 2 +* +* Contents: This global variable provides definitions of the known Casio Type 2 +* Makernote tags, indexed by their tag number. +* +******************************************************************************/ + +$GLOBALS[ "IFD_Tag_Definitions" ]["Casio Type 2"] = array( + +0x0002 => array( 'Name' => "Preview Thumbnail Dimensions", + 'Type' => "Numeric", + 'Units' => "(x,y pixels)" ), + +0x0003 => array( 'Name' => "Preview Thumbnail Size", + 'Type' => "Numeric", + 'Units' => "bytes" ), + +0x0004 => array( 'Name' => "Preview Thumbnail", // thumbnail offset + 'Type' => "Numeric" ), + + +0x0008 => array( 'Name' => "Quality Mode", + 'Type' => "Lookup", + 1 => "Fine", + 2 => "Super Fine" ), + +0x0009 => array( 'Name' => "Image Size", + 'Type' => "Lookup", + 20 => "2288 x 1712 pixels", + 36 => "3008 x 2008 pixels", + 5 => "2048 x 1536 pixels", + 4 => "1600 x 1200 pixels", + 21 => "2592 x 1944 pixels", + 0 => "640 x 480 pixels", + 22 => "2304 x 1728 pixels" ), + +0x000D => array( 'Name' => "Focus Mode", + 'Type' => "Lookup", + 0 => "Normal", + 1 => "Macro" ), + + +0x0014 => array( 'Name' => "Iso Sensitivity", + 'Type' => "Lookup", + 3 => "50", + 4 => "64", + 6 => "100", + 9 => "200" ), + + +0x0019 => array( 'Name' => "White Balance", + 'Type' => "Lookup", + 0 => "Auto", + 1 => "Daylight", + 2 => "Shade", + 3 => "Tungsten", + 4 => "Fluorescent", + 5 => "Manual" ), + +0x001D => array( 'Name' => "Focal Length", + 'Type' => "Special", + 'Units' => "mm" ), + +0x001F => array( 'Name' => "Saturation", + 'Type' => "Lookup", + 0 => "-1", + 1 => "Normal", + 2 => "+1", ), + +0x0020 => array( 'Name' => "Contrast", + 'Type' => "Lookup", + 0 => "-1", + 1 => "Normal", + 2 => "+1", ), + +0x0021 => array( 'Name' => "Sharpness", + 'Type' => "Lookup", + 0 => "-1", + 1 => "Normal", + 2 => "+1", ), + + +0x0e00 => array( 'Name' => "Print Image Matching Info", + 'Type' => "PIM" ), + + +0x2000 => array( 'Name' => "Casio Preview Thumbnail", // thumbnail offset + 'Type' => "String" ), + + + +0x2011 => array( 'Name' => "White Balance Bias", + 'Type' => "Numeric" ), + + +0x2012 => array( 'Name' => "White Balance", + 'Type' => "Lookup", + 12 => "Flash", + 0 => "Manual", + 1 => "Auto?", + 4 => "Flash?", ), + +0x2022 => array( 'Name' => "Object Distance", + 'Type' => "Numeric", + 'Units' => "mm" ), + + +0x2034 => array( 'Name' => "Flash Distance", + 'Type' => "Numeric", + 'Units' => " (0=Off)" ), + +0x3000 => array( 'Name' => "Record Mode", + 'Type' => "Lookup", + 2 => "Normal Mode" ), + +0x3001 => array( 'Name' => "Self Timer?", + 'Type' => "Lookup", + 1 => "Off?" ), + + +0x3002 => array( 'Name' => "Quality", + 'Type' => "Lookup", + 3 => "Fine" ), + +0x3003 => array( 'Name' => "Focus Mode", + 'Type' => "Lookup", + 6 => "Multi-Area Auto Focus", + 1 => "Fixation" ), + + +0x3006 => array( 'Name' => "Time Zone", + 'Type' => "String" ), + + +0x3007 => array( 'Name' => "Bestshot Mode", + 'Type' => "Lookup", + 0 => "Off", + 1 => "On?" ), + + +0x3014 => array( 'Name' => "CCD ISO Sensitivity", + 'Type' => "Numeric" ), + + + +0x3015 => array( 'Name' => "Colour Mode", + 'Type' => "Lookup", + 0 => "Off" ), + + +0x3016 => array( 'Name' => "Enhancement", + 'Type' => "Lookup", + 0 => "Off" ), + +0x3017 => array( 'Name' => "Filter", + 'Type' => "Lookup", + 0 => "Off" ), + + +); + +/****************************************************************************** +* End of Global Variable: IFD_Tag_Definitions, Casio Type 2 +******************************************************************************/ + + + + + + + + + + + + + + + + + + +?> \ No newline at end of file diff --git a/jpeg_metadata_tk/Makernotes/epson.php b/jpeg_metadata_tk/Makernotes/epson.php new file mode 100644 index 0000000..16057bb --- /dev/null +++ b/jpeg_metadata_tk/Makernotes/epson.php @@ -0,0 +1,119 @@ + diff --git a/jpeg_metadata_tk/Makernotes/fujifilm.php b/jpeg_metadata_tk/Makernotes/fujifilm.php new file mode 100644 index 0000000..5d135cd --- /dev/null +++ b/jpeg_metadata_tk/Makernotes/fujifilm.php @@ -0,0 +1,344 @@ + array( 'Name' => "Version", + 'Type' => "String" ), + +4096 => array( 'Name' => "Quality", + 'Type' => "String" ), + +4097 => array( 'Name' => "Sharpness", + 'Type' => "Lookup", + 1 => "Softest", + 2 => "Soft", + 3 => "Normal", + 4 => "Hard", + 5 => "Hardest" ), + +4098 => array( 'Name' => "White Balance", + 'Type' => "Lookup", + 0 => "Auto", + 256 => "Daylight", + 512 => "Cloudy", + 768 => "DaylightColour-fluorescence", + 769 => "DaywhiteColour-fluorescence", + 770 => "White-fluorescence", + 1024 => "Incandenscense", + 3840 => "Custom white balance" ), + +4099 => array( 'Name' => "Colour Saturation", + 'Type' => "Lookup", + 0 => "Normal", + 256 => "High", + 512 => "Low" ), + +4100 => array( 'Name' => "Tone (Contrast)", + 'Type' => "Lookup", + 0 => "Normal", + 256 => "High", + 512 => "Low" ), + +4112 => array( 'Name' => "Flash Mode", + 'Type' => "Lookup", + 0 => "Auto", + 1 => "On", + 2 => "Off", + 3 => "Red-eye Reduction" ), + +4113 => array( 'Name' => "Flash Strength", + 'Type' => "Numeric", + 'Units' => "EV" ), + +4128 => array( 'Name' => "Macro", + 'Type' => "Lookup", + 0 => "Off", + 1 => "On" ), + +4129 => array( 'Name' => "Focus Mode", + 'Type' => "Lookup", + 0 => "Auto Focus", + 1 => "Manual Focus" ), + +4144 => array( 'Name' => "Slow Sync", + 'Type' => "Lookup", + 0 => "Off", + 1 => "On" ), + +4145 => array( 'Name' => "Picture Mode", + 'Type' => "Lookup", + 0 => "Auto", + 1 => "Portrait Scene", + 2 => "Landscape Scene", + 4 => "Sports Scene", + 5 => "Night Scene", + 6 => "Program AE", + 256 => "Aperture priority AE", + 512 => "Shutter priority AE", + 768 => "Manual Exposure" ), + +4352 => array( 'Name' => "Continuous taking or auto bracketing mode", + 'Type' => "Lookup", + 0 => "Off", + 1 => "On" ), + +4864 => array( 'Name' => "Blur Warning", + 'Type' => "Lookup", + 0 => "No Blur Warning", + 1 => "Blur Warning" ), + +4865 => array( 'Name' => "Focus warning", + 'Type' => "Lookup", + 0 => "Auto Focus Good", + 1 => "Out of Focus" ), + +4866 => array( 'Name' => "Auto Exposure Warning", + 'Type' => "Lookup", + 0 => "Auto Exposure Good", + 1 => "Over exposure (>1/1000s,F11)" ) + +); + +/****************************************************************************** +* End of Global Variable: IFD_Tag_Definitions, Fujifilm +******************************************************************************/ + + + + + +?> diff --git a/jpeg_metadata_tk/Makernotes/konica_minolta.php b/jpeg_metadata_tk/Makernotes/konica_minolta.php new file mode 100644 index 0000000..17bbfbd --- /dev/null +++ b/jpeg_metadata_tk/Makernotes/konica_minolta.php @@ -0,0 +1,745 @@ + array ( 'Name' => "Exposure Mode", + 'Type' => "Lookup", + 0 => "P", + 1 => "A", + 2 => "S", + 3 => "M" ), + +3 => array ( 'Name' => "Flash Mode", + 'Type' => "Lookup", + 0 => "Normal", + 1 => "Red-eye reduction", + 2 => "Rear flash sync", + 3 => "Wireless" ), + +4 => array ( 'Name' => "White Balance", + 'Type' => "Lookup", + 0 => "Auto", + 1 => "Daylight", + 2 => "Cloudy", + 3 => "Tungsten", + 5 => "Custom", + 7 => "Fluorescent", + 8 => "Fluorescent 2", + 11 => "Custom 2", + 12 => "Custom 3" ), + +5 => array ( 'Name' => "Image Size", + 'Type' => "Lookup", + 0 => "2560 x 1920 (2048x1536 - DiMAGE 5 only)", + 1 => "1600 x 1200", + 2 => "1280 x 960", + 3 => "640 x 480" ), + + +6 => array ( 'Name' => "Image Quality", + 'Type' => "Lookup", + 0 => "Raw", + 1 => "Super Fine", + 2 => "Fine", + 3 => "Standard", + 4 => "Economy", + 5 => "Extra Fine" ), + +7 => array ( 'Name' => "Shooting Mode", + 'Type' => "Lookup", + 0 => "Single", + 1 => "Continuous", + 2 => "Self-timer", + 4 => "Bracketing", + 5 => "Interval", + 6 => "UHS Continuous", + 7 => "HS Continuous" ), + + +8 => array ( 'Name' => "Metering Mode", + 'Type' => "Lookup", + 0 => "Multi-Segment", + 1 => "Centre Weighted", + 2 => "Spot" ), + + +9 => array ( 'Name' => "Apex Film Speed Value", + 'Type' => "Special" ), + +// 09 FilmSpeed , APEX Film Speed Value , Speed value = x/8-1 , ISO= (2^(x/8-1))*3.125 + + +10 => array ( 'Name' => "Apex Shutter Speed Time Value", + 'Type' => "Special", + 'Units' => "Seconds?" ), + +// APEX Time Value , Time value = x/8-6 , ShutterSpeed = 2^( (48-x)/8 ), ! Due to rounding error x=8 should be displayed as 30 sec. + +11 => array ( 'Name' => "Apex Aperture Value", + 'Type' => "Special" ), + +// APEX Aperture Value ApertureValue = x/8-1 , Aperture = 2^( x/16-0.5 ) + + +12 => array ( 'Name' => "Macro Mode", + 'Type' => "Lookup", + 0 => "Off", + 1 => "On" ), + +13 => array ( 'Name' => "Digital Zoom", + 'Type' => "Lookup", + 0 => "Off", + 1 => "Electronic magnification was used", + 2 => "Digital zoom 2x" ), + + +14 => array ( 'Name' => "Exposure Compensation", + 'Type' => "Special", + 'Units' => "EV" ), + +// EV = x/3 -2 Exposure compensation in EV + + +15 => array ( 'Name' => "Bracket Step", + 'Type' => "Lookup", + 0 => "1/3 EV", + 1 => "2/3 EV", + 2 => "1 EV" ), + + +17 => array ( 'Name' => "Interval Length", + 'Type' => "Special", + 'Units' => "Min" ), + +// interval is x+1 min (used with interval mode) + + +18 => array ( 'Name' => "Interval Number", + 'Type' => "Numeric", + 'Units' => "frames" ), + +19 => array ( 'Name' => "Focal Length", + 'Type' => "Special", + 'Units' => "mm" ), + +// x / 256 is real focal length in mm , x / 256 * 3.9333 is 35-mm equivalent + + +20 => array ( 'Name' => "Focus Distance", + 'Type' => "Numeric", + 'Units' => "mm ( 0 = Infinity)" ), + + +21 => array ( 'Name' => "Flash Fired", + 'Type' => "Lookup", + 0 => "No", + 1 => "Yes" ), + +22 => array ( 'Name' => "Date", + 'Type' => "Special" ), + +// yyyymmdd , year = x/65536 , month = x/256-x/65536*256 , day = x%256 + +23 => array ( 'Name' => "Time", + 'Type' => "Special" ), + +// hhhhmmss , hour = x/65536 , minute = x/256-x/65536*256 , second = x%256 + + +24 => array ( 'Name' => "Max Aperture at this focal length", + 'Type' => "Special" ), + +// Fno = 2^(x/16-0.5) + + +27 => array ( 'Name' => "File Number Memory", + 'Type' => "Lookup", + 0 => "Off", + 1 => "On" ), + +28 => array ( 'Name' => "Last File Number", + 'Type' => "Numeric", + 'Units' => " ( 0 = File Number Memory is Off)" ), + + +29 => array ( 'Name' => "White Balance Red", + 'Type' => "Special" ), + +// x/256 - red white balance coefficient used for this picture + + +30 => array ( 'Name' => "White Balance Green", + 'Type' => "Special" ), + +// x/256 - green white balance coefficient used for this picture + +31 => array ( 'Name' => "White Balance Blue", + 'Type' => "Special" ), + +// x/256 - blue white balance coefficient used for this picture + + +32 => array ( 'Name' => "Saturation", + 'Type' => "Special" ), + +// x-3 = saturation + + +33 => array ( 'Name' => "Contrast", + 'Type' => "Special" ), + +// x-3 - contrast + + +34 => array ( 'Name' => "Sharpness", + 'Type' => "Lookup", + 0 => "Hard", + 1 => "Normal", + 2 => "Soft" ), + + +35 => array ( 'Name' => "Subject Program", + 'Type' => "Lookup", + 0 => "none", + 1 => "portrait", + 2 => "text", + 3 => "night portrait", + 4 => "sunset", + 5 => "sports action" ), + + +36 => array ( 'Name' => "Flash Compensation", + 'Type' => "Special", + 'Units' => "EV" ), + +// (x-6)/3 = flash compensation in EV + + +37 => array ( 'Name' => "ISO Setting", + 'Type' => "Lookup", + 0 => "100", + 1 => "200", + 2 => "400", + 3 => "800", + 4 => "auto", + 5 => "64" ), + + +38 => array ( 'Name' => "Camera Model", + 'Type' => "Lookup", + 0 => "DiMAGE 7", + 1 => "DiMAGE 5", + 2 => "DiMAGE S304", + 3 => "DiMAGE S404", + 4 => "DiMAGE 7i", + 5 => "DiMAGE 7Hi", + 6 => "DiMAGE A1", + 7 => "DiMAGE S414" ), + + +39 => array ( 'Name' => "Interval Mode", + 'Type' => "Lookup", + 0 => "Still Image", + 1 => "Time-lapse Movie" ), + + +40 => array ( 'Name' => "Folder Name", + 'Type' => "Lookup", + 0 => "Standard Form", + 1 => "Data Form" ), + + +41 => array ( 'Name' => "Color Mode", + 'Type' => "Lookup", + 0 => "Natural Color", + 1 => "Black & White", + 2 => "Vivid Color", + 3 => "Solarization", + 4 => "Adobe RGB" ), + + +42 => array ( 'Name' => "Color Filter", + 'Type' => "Special" ), + +// x-3 = color filter + + +43 => array ( 'Name' => "Black & White Filter", + 'Type' => "Numeric" ), + + + +44 => array ( 'Name' => "Internal Flash", + 'Type' => "Lookup", + 0 => "Not Fired", + 1 => "Fired" ), + + + +45 => array ( 'Name' => "Apex Brightness Value", + 'Type' => "Special" ), + +// Brightness Value = x/8-6 + + + + +46 => array ( 'Name' => "Spot Focus Point X Coordinate", + 'Type' => "Numeric" ), + + + +47 => array ( 'Name' => "Spot Focus Point Y Coordinate", + 'Type' => "Numeric" ), + + + +48 => array ( 'Name' => "Wide Focus Zone", + 'Type' => "Lookup", + 0 => "No Zone or AF Failed", + 1 => "Center Zone (Horizontal Orientation)", + 2 => "Center Zone (Vertical Orientation)", + 3 => "Left Zone", + 4 => "Right Zone" ), + + +49 => array ( 'Name' => "Focus Mode", + 'Type' => "Lookup", + 0 => "Auto Focus", + 1 => "Manual Focus" ), + + +50 => array ( 'Name' => "Focus Area", + 'Type' => "Lookup", + 0 => "Wide Focus (normal)", + 1 => "Spot Focus" ), + + +51 => array ( 'Name' => "DEC Switch Position", + 'Type' => "Lookup", + 0 => "Exposure", + 1 => "Contrast", + 2 => "Saturation", + 3 => "Filter" ), + + + +); + +/****************************************************************************** +* End of Global Variable: Minolta_Camera_Setting_Definitions +******************************************************************************/ + + + + +?> diff --git a/jpeg_metadata_tk/Makernotes/kyocera.php b/jpeg_metadata_tk/Makernotes/kyocera.php new file mode 100644 index 0000000..bb5f17e --- /dev/null +++ b/jpeg_metadata_tk/Makernotes/kyocera.php @@ -0,0 +1,241 @@ + array( 'Name' => "Kyocera Proprietory Format Thumbnail", + 'Type' => "Unknown" ), + +0x0E00 => array( 'Name' => "Print Image Matching Info", + 'Type' => "PIM" ), + +); + +/****************************************************************************** +* End of Global Variable: IFD_Tag_Definitions, Kyocera +******************************************************************************/ + + + + + + + + +?> diff --git a/jpeg_metadata_tk/Makernotes/nikon.php b/jpeg_metadata_tk/Makernotes/nikon.php new file mode 100644 index 0000000..b860d51 --- /dev/null +++ b/jpeg_metadata_tk/Makernotes/nikon.php @@ -0,0 +1,731 @@ + array( 'Name' => "Quality", + 'Description' => "1: VGA Basic, 2: VGA Normal, 3: VGA Fine, 4: SXGA Basic, 5: SXGA Normal, 6: SXGA Fine", + 'Type' => "Lookup", + 1 => "VGA (640x480) Basic", + 2 => "VGA (640x480) Normal", + 3 => "VGA (640x480) Fine", + 4 => "SXGA (1280x960) Basic", + 5 => "SXGA (1280x960) Normal", + 6 => "SXGA (1280x960) Fine", + 7 => "Unknown, Possibly XGA (1024x768) Basic", + 8 => "Unknown, Possibly XGA (1024x768) Basic", + 9 => "Unknown, Possibly XGA (1024x768) Basic", + 10 => "UXGA (1600x1200) Basic", + 11 => "UXGA (1600x1200) Normal", + 12 => "UXGA (1600x1200) Fine" ), + +4 => array( 'Name' => "Colour Mode", + 'Description' => "1: Colour, 2: Monochrome.", + 'Type' => "Lookup", + 1 => "Colour", + 2 => "Monochrome" ), + +5 => array( 'Name' => "Image Adjustment", + 'Description' => "0: Normal, 1: Bright+, 2: Bright-, 3: Contrast+, 4: Contrast-.", + 'Type' => "Lookup", + 0 => "Normal", + 1 => "Bright+", + 2 => "Bright-", + 3 => "Contrast+", + 4 => "Contrast-" ), + +6 => array( 'Name' => "CCD Sensitivity", + 'Description' => "0: ISO80, 2: ISO160, 4: ISO320, 5: ISO100", + 'Type' => "Lookup", + 0 => "ISO 80", + 2 => "ISO 160", + 4 => "ISO 320", + 5 => "ISO 100" ), + +7 => array( 'Name' => "White Balance", + 'Description' => "0: Auto, 1: Preset, 2: Daylight, 3: Incandescense, 4: Fluorescence, 5: Cloudy, 6: SpeedLight", + 'Type' => "Lookup", + 0 => "Auto", + 1 => "Preset", + 2 => "Daylight", + 3 => "Incandescense", + 4 => "Flourescence", + 5 => "Cloudy", + 6 => "Speedlight" ), + +8 => array( 'Name' => "Focus", + 'Description' => "If infinite focus, value is '1/0'.", + 'Type' => "Numeric" ), + +10 => array( 'Name' => "Digital Zoom", + 'Description' => "'160/100' means 1.6x digital zoom, '0/100' means no digital zoom (optical zoom only).", + 'Type' => "Numeric" ), + +11 => array( 'Name' => "Converter", + 'Description' => "If Fisheye Converter is used, value is 1", + 'Type' => "Lookup", + 0 => "No Converter Used", + 1 => "Fish-eye Converter Used" ) + +); + +/****************************************************************************** +* End of Global Variable: IFD_Tag_Definitions, Nikon Type 1 +******************************************************************************/ + + + + + +/****************************************************************************** +* Global Variable: IFD_Tag_Definitions, Nikon Type 3 +* +* Contents: This global variable provides definitions of the known Nikon Type 3 +* Makernote tags, indexed by their tag number. +* +******************************************************************************/ + +$GLOBALS[ "IFD_Tag_Definitions" ]["Nikon Type 3"] = array( + + +1 => array( 'Name' => "Nikon Makernote Version", + 'Type' => "Special" ), + +2 => array( 'Name' => "ISO Speed Used", + 'Type' => "Special" ), + +3 => array( 'Name' => "Colour Mode", + 'Type' => "String" ), + +4 => array( 'Name' => "Quality", + 'Type' => "String" ), + +5 => array( 'Name' => "White Balance", + 'Type' => "String" ), + +6 => array( 'Name' => "Sharpening", + 'Type' => "String" ), + +7 => array( 'Name' => "Focus Mode", + 'Type' => "String" ), + +8 => array( 'Name' => "Flash Setting", + 'Type' => "String" ), + +9 => array( 'Name' => "Auto Flash Mode", + 'Type' => "String" ), + +11 => array( 'Name' => "White Balance Bias Value", + 'Type' => "Numeric", + 'Units' => "(Units Approx: 100 Mired per increment)" ), + +12 => array( 'Name' => "White Balance Red, Blue Coefficients?", + 'Type' => "Numeric" ), + +15 => array( 'Name' => "ISO Selection?", + 'Type' => "String" ), + + +18 => array( 'Name' => "Flash Compensation", + 'Type' => "Lookup", + 0x06 => "+1.0 EV", + 0x04 => "+0.7 EV", + 0x03 => "+0.5 EV", + 0x02 => "+0.3 EV", + 0x00 => "0.0 EV", + 0xfe => "-0.3 EV", + 0xfd => "-0.5 EV", + 0xfc => "-0.7 EV", + 0xfa => "-1.0 EV", + 0xf8 => "-1.3 EV", + 0xf7 => "-1.5 EV", + 0xf6 => "-1.7 EV", + 0xf4 => "-2.0 EV", + 0xf2 => "-2.3 EV", + 0xf1 => "-2.5 EV", + 0xf0 => "-2.7 EV", + 0xee => "-3.0 EV" ), + +19 => array( 'Name' => "ISO Speed Requested", + 'Type' => "Special", + 'Units' => "(May be different to Speed Used when Auto ISO is on)" ), + + +22 => array( 'Name' => "Photo corner coordinates", + 'Type' => "Numeric", + 'Units' => "Pixels" ), + +24 => array( 'Name' => "Flash Bracket Compensation Applied", + 'Type' => "Lookup", + 0x06 => "+1.0 EV", + 0x04 => "+0.7 EV", + 0x03 => "+0.5 EV", + 0x02 => "+0.3 EV", + 0x00 => "0.0 EV", + 0xfe => "-0.3 EV", + 0xfd => "-0.5 EV", + 0xfc => "-0.7 EV", + 0xfa => "-1.0 EV", + 0xf8 => "-1.3 EV", + 0xf7 => "-1.5 EV", + 0xf6 => "-1.7 EV", + 0xf4 => "-2.0 EV", + 0xf2 => "-2.3 EV", + 0xf1 => "-2.5 EV", + 0xf0 => "-2.7 EV", + 0xee => "-3.0 EV" ), + +25 => array( 'Name' => "AE Bracket Compensation Applied", + 'Type' => "Numeric", + 'Units' => "EV" ), + +128 => array( 'Name' => "Image Adjustment?", + 'Type' => "String" ), + +129 => array( 'Name' => "Tone Compensation (Contrast)", + 'Type' => "String" ), + +130 => array( 'Name' => "Auxiliary Lens (Adapter)", + 'Type' => "String" ), + +131 => array( 'Name' => "Lens Type?", + 'Type' => "Lookup", + 6 => "Nikon D series Lens", + 14 => "Nikon G series Lens" ), + +132 => array( 'Name' => "Lens Min/Max Focal Length, Min/Max Aperture", + 'Type' => "Numeric", + 'Units' => " mm, mm, F#, F#" ), + +133 => array( 'Name' => "Manual Focus Distance?", + 'Type' => "Numeric"), + +134 => array( 'Name' => "Digital Zoom Factor?", + 'Type' => "Numeric" ), + +135 => array( 'Name' => "Flash Used", + 'Type' => "Lookup", + 0 => "Flash Not Used", + 9 => "Flash Fired" ), + +136 => array( 'Name' => "Auto Focus Area", + 'Description' => "byte 1 : AF Mode: 00 = single area, 01 = Dynamic Area, 02 = Closest Subject\n + byte 2 : AF Area Selected : 00 = Centre, 01 = Top, 02 = Bottom, 03 = Left, 04 = Right\n + byte 3 : Unknown, always zero\n + byte 4 : Properly focused Area(s) : bit 0 = Centre, bit 1 = Top, bit 2 = Bottom, bit 3 = Left, bit 4 = Right", + 'Type' => "Special" ), + +137 => array( 'Name' => "Bracketing & Shooting Mode", + 'Description' => "bit 0&1 (0 = single frame, 1 = continuous,2=timer, 3=remote timer? 4 = remote?\n + bit 4, Bracketing on or off\n + bit 6, white Balance Bracketing on", + 'Type' => "Special" ), + +141 => array( 'Name' => "Colour Mode", + 'Description' =>"1a = Portrait sRGB, 2 = Adobe RGB, 3a = Landscape sRGB", + 'Type' => "String" ), + +143 => array( 'Name' => "Scene Mode?", + 'Type' => "Numeric" ), + +144 => array( 'Name' => "Lighting Type", + 'Type' => "String" ), + +146 => array( 'Name' => "Hue Adjustment", + 'Type' => "Numeric", + 'Units' => "Degrees" ), + +148 => array( 'Name' => "Saturation?", + 'Type' => "Lookup", + -3 => "Black and White", + -2 => "-2", + -1 => "-1", + 0 => "Normal", + 1 => "+1", + 2 => "+2" ), + +149 => array( 'Name' => "Noise Reduction", + 'Type' => "String" ), + +167 => array( 'Name' => "Total Number of Shutter Releases for Camera", + 'Type' => "Numeric", + 'Units' => "Shutter Releases" ), + +169 => array( 'Name' => "Image optimisation", + 'Type' => "String" ), + +170 => array( 'Name' => "Saturation", + 'Type' => "String" ), + +171 => array( 'Name' => "Digital Vari-Program", + 'Type' => "String" ) + + +// Tags that exist but are unknown: 10, 13, 14, 16, 17, 23, 24, 138, 139, 145, +// 151, 152, 160, 162 163, 165, 166, 168 + + +); + +/****************************************************************************** +* End of Global Variable: IFD_Tag_Definitions, Nikon Type 3 +******************************************************************************/ + + + +?> diff --git a/jpeg_metadata_tk/Makernotes/olympus.php b/jpeg_metadata_tk/Makernotes/olympus.php new file mode 100644 index 0000000..a9717b0 --- /dev/null +++ b/jpeg_metadata_tk/Makernotes/olympus.php @@ -0,0 +1,486 @@ + 1.11 : changed get_Olympus_Makernote_Html to allow thumbnail links to work when +* toolkit is portable across directories +* +* URL: http://electronics.ozhiker.com +* +* Copyright: Copyright Evan Hunter 2004 +* This file may be used freely for non-commercial purposes.For +* commercial uses please contact the author: evan@ozhiker.com +* +******************************************************************************/ + + + +// Add the parser and interpreter functions to the list of Makernote parsers and interpreters. + +$GLOBALS['Makernote_Function_Array']['Read_Makernote_Tag'][] = "get_Olympus_Makernote"; +$GLOBALS['Makernote_Function_Array']['get_Makernote_Text_Value'][] = "get_Olympus_Text_Value"; +$GLOBALS['Makernote_Function_Array']['Interpret_Makernote_to_HTML'][] = "get_Olympus_Makernote_Html"; + + + + +include_once dirname(__FILE__) .'/../pjmt_utils.php'; // Change: as of version 1.11 - added to allow directory portability + + + + +/****************************************************************************** +* +* Function: get_Olympus_Makernote +* +* Description: Decodes the Makernote tag and returns the new tag with the decoded +* information attached. Returns false if this is not a makernote +* that can be processed with this script +* +* Parameters: Makernote_Tag - the element of an EXIF array containing the +* makernote, as returned from get_EXIF_JPEG +* EXIF_Array - the entire EXIF array containing the +* makernote, as returned from get_EXIF_JPEG, in +* case more information is required for decoding +* filehnd - an open file handle for the file containing the +* makernote - does not have to be positioned at the +* start of the makernote +* Make_Field - The contents of the EXIF Make field, to aid +* determining whether this script can decode +* the makernote +* +* +* Returns: Makernote_Tag - the Makernote_Tag from the parameters, but +* modified to contain the decoded information +* FALSE - If this script could not decode the makernote, or if +* an error occured in decoding +* +******************************************************************************/ + +function get_Olympus_Makernote( $Makernote_Tag, $EXIF_Array, $filehnd, $Make_Field ) +{ + + // Check if the Make Field contains the word Olympus + if ( stristr( $Make_Field, "Olympus" ) === FALSE ) + { + return FALSE; + } + + // Check if the header exists at the start of the Makernote + if ( ( substr( $Makernote_Tag['Data'], 0, 7 ) != "OLYMP\x00\x01" ) && + ( substr( $Makernote_Tag['Data'], 0, 7 ) != "OLYMP\x00\x02" ) ) + { + // This isn't a Olympus Makernote, abort + return FALSE ; + } + + + + // Seek to the start of the IFD + fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset'] + 8 ); + + // Read the IFD(s) into an array + $Makernote_Tag['Decoded Data'] = read_Multiple_IFDs( $filehnd, $Makernote_Tag['Tiff Offset'], $Makernote_Tag['ByteAlign'], "Olympus" ); + + // Save some information into the Tag element to aid interpretation + $Makernote_Tag['Decoded'] = TRUE; + $Makernote_Tag['Makernote Type'] = "Olympus"; + $Makernote_Tag['Makernote Tags'] = "Olympus"; + + + // Return the new tag + return $Makernote_Tag; +} + +/****************************************************************************** +* End of Function: get_Olympus_Makernote +******************************************************************************/ + + + + + + + +/****************************************************************************** +* +* Function: get_Olympus_Text_Value +* +* Description: Provides a text value for any tag marked as special for makernotes +* that this script can decode. Returns false if this is not a makernote +* that can be processed with this script +* +* Parameters: Exif_Tag - the element of an the Makernote array containing the +* tag in question, as returned from get_Olympus_Makernote +* Tag_Definitions_Name - The name of the Tag Definitions group +* within the global array IFD_Tag_Definitions +* +* +* Returns: output - the text value for the tag +* FALSE - If this script could not decode the makernote, or if +* an error occured in decoding +* +******************************************************************************/ + +function get_Olympus_Text_Value( $Exif_Tag, $Tag_Definitions_Name ) +{ + // Check that this tag uses the Olympus tags, otherwise it can't be decoded here + if ( $Tag_Definitions_Name !== "Olympus" ) + { + // Not an Olympus tag - can't decode it + return FALSE; + } + + + // Process the tag acording to it's tag number, to produce a text value + if ( $Exif_Tag['Tag Number'] == 0x200 ) + { + // Special Mode Tag + + // Add info from the first value to the output string + switch ( $Exif_Tag['Data'][0] ) + { + case 0: $outputstr = "Normal\n"; + break; + case 2: $outputstr = "Fast\n"; + break; + case 3: $outputstr = "Panorama\n"; + break; + default: $outputstr = "Unknown Mode ( " . $Exif_Tag['Data'][0] . " )\n"; + break; + } + + // Add info from the second value to the output string + $outputstr .= "Sequence Number: " . $Exif_Tag['Data'][1] . "\n"; + + // Add info from the third value to the output string + switch ( $Exif_Tag['Data'][2] ) + { + case 0: // Do nothing + break; + case 1: $outputstr .= "Panorama Direction: Left to Right\n"; + break; + case 2: $outputstr .= "Panorama Direction: Right to Left\n"; + break; + case 3: $outputstr .= "Panorama Direction: Bottom to Top\n"; + break; + case 4: $outputstr .= "Panorama Direction: Top to Bottom\n"; + break; + default: $outputstr .= "Unknown Panorama Direction\n"; + break; + } + + // Return the output string + return $outputstr; + } + else + { + // Unknown special tag - can't process it here + return FALSE; + } + + // Unknown special tag - can't process it here + return FALSE; + +} + +/****************************************************************************** +* End of Function: get_Olympus_Text_Value +******************************************************************************/ + + + + +/****************************************************************************** +* +* Function: get_Olympus_Makernote_Html +* +* Description: Attempts to interpret a makernote into html. Returns false if +* it is not a makernote that can be processed with this script +* +* Parameters: Makernote_Tag - the element of an EXIF array containing the +* makernote, as returned from get_EXIF_JPEG +* filename - the name of the JPEG file being processed ( used +* by scripts which display embedded thumbnails) +* +* +* Returns: output - the html representing the makernote +* FALSE - If this script could not interpret the makernote, or if +* an error occured in decoding +* +******************************************************************************/ + +function get_Olympus_Makernote_Html( $Makernote_tag, $filename ) +{ + + // Check that this tag uses the Olympus tags, otherwise it can't be interpreted here + if ( $Makernote_tag['Makernote Tags'] != "Olympus" ) + { + // Not Olympus tags - can't interpret with this function + return FALSE; + } + + // Check if the Decoded data is valid + if ( $Makernote_tag['Decoded Data'][0] === FALSE ) + { + // Decoded data is not valid - can't interpret with this function + return FALSE; + } + + // Minolta Thumbnail 1 + if ( ( array_key_exists( 0x0088, $Makernote_tag['Decoded Data'][0] ) ) && + ( $Makernote_tag['Makernote Tags'] == "Olympus" ) ) + { + // Change: as of version 1.11 - Changed to make thumbnail link portable across directories + // Build the path of the thumbnail script and its filename parameter to put in a url + $link_str = get_relative_path( dirname(__FILE__) . "/../get_minolta_thumb.php" , getcwd ( ) ); + $link_str .= "?filename="; + $link_str .= get_relative_path( $filename, dirname(__FILE__) ."/.." ); + + // Add thumbnail link to html + $Makernote_tag['Decoded Data'][0][0x0088]['Text Value'] = ""; + + $Makernote_tag['Decoded Data'][0][0x0088]['Type'] = "String"; + } + // Minolta Thumbnail 2 + if ( ( array_key_exists( 0x0081, $Makernote_tag['Decoded Data'][0] ) ) && + ( $Makernote_tag['Makernote Tags'] == "Olympus" ) ) + { + // Change: as of version 1.11 - Changed to make thumbnail link portable across directories + // Build the path of the thumbnail script and its filename parameter to put in a url + $link_str = get_relative_path( dirname(__FILE__) . " /../get_minolta_thumb.php" , getcwd ( ) ); + $link_str .= "?filename="; + $link_str .= get_relative_path( $filename, dirname(__FILE__) ."/.." ); + + // Add thumbnail link to html + $Makernote_tag['Decoded Data'][0][0x0081]['Text Value'] = ""; + $Makernote_tag['Decoded Data'][0][0x0081]['Type'] = "String"; + } + + // Interpret the IFD and return the HTML + return interpret_IFD( $Makernote_tag['Decoded Data'][0], $filename ); + +} + +/****************************************************************************** +* End of Function: get_Olympus_Makernote_Html +******************************************************************************/ + + + + + + + + + + + + +/****************************************************************************** +* Global Variable: IFD_Tag_Definitions, Olympus +* +* Contents: This global variable provides definitions of the known Olympus +* Makernote tags, indexed by their tag number. +* It also includes Minolta and Agfa tags, as they use many of the +* same tags +* +******************************************************************************/ + +$GLOBALS[ "IFD_Tag_Definitions" ]["Olympus"] = array( + +0x0000 => array( 'Name' => "Makernote Version", // Minolta + 'Type' => "String" ), + +0x0001 => array( 'Name' => "Camera Settings", // Minolta + 'Type' => "Special" ), + +0x0003 => array( 'Name' => "Camera Settings", // Minolta + 'Type' => "Special" ), + +0x0040 => array( 'Name' => "Compressed Image Size", // Minolta + 'Type' => "Numeric", + 'Units' => "Bytes" ), + +0x0081 => array( 'Name' => "Minolta Thumbnail", // Minolta + 'Type' => "Special" ), + +0x0088 => array( 'Name' => "Minolta Thumbnail", // Minolta + 'Type' => "Special" ), + +0x0089 => array( 'Name' => "Minolta Thumbnail Length", // Minolta + 'Type' => "Numeric", + 'Units' => "bytes" ), + +0x0101 => array( 'Name' => "Colour Mode", // Minolta + 'Type' => "Lookup", + 0 => "Natural Colour", + 1 => "Black & White", + 2 => "Vivid colour", + 3 => "Solarization", + 4 => "AdobeRGB" ), + +0x0102 => array( 'Name' => "Image Quality", // Minolta + 'Type' => "Lookup", + 0 => "Raw", + 1 => "Super Fine", + 2 => "Fine", + 3 => "Standard", + 4 => "Extra Fine" ), + +0x0103 => array( 'Name' => "Image Quality?", // Minolta + 'Type' => "Lookup", + 0 => "Raw", + 1 => "Super Fine", + 2 => "Fine", + 3 => "Standard", + 4 => "Extra Fine" ), + + + +0x0200 => array( 'Name' => "Special Mode", + 'Type' => "Special" ), + + +0x0201 => array( 'Name' => "JPEG Quality", + 'Type' => "Lookup", + 1 => "Standard Quality", + 2 => "High Quality", + 3 => "Super High Quality" ), + +0x0202 => array( 'Name' => "Macro", + 'Type' => "Lookup", + 0 => "Normal (Not Macro)", + 1 => "Macro" ), + +0x0204 => array( 'Name' => "Digital Zoom", + 'Type' => "Numeric", + 'Units' => " x Digital Zoom, (0 or 1 = normal)" ), + +0x0207 => array( 'Name' => "Firmware Version", + 'Type' => "String" ), + + +0x0208 => array( 'Name' => "Picture Info Data", + 'Type' => "String" ), + +0x0209 => array( 'Name' => "Camera ID", + 'Type' => "String" ), + + +0x020B => array( 'Name' => "Image Width", // Epson Tag + 'Type' => "Pixels" ), + +0x020C => array( 'Name' => "Image Height", // Epson Tag + 'Type' => "Pixels" ), + +0x020D => array( 'Name' => "Original Manufacturer Model?", // Epson Tag + 'Type' => "String" ), + +0x0E00 => array( 'Name'=> "Print Image Matching Info", // Minolta Tag + 'Type' => "PIM" ), + +0x1004 => array( 'Name' => "Flash Mode", + 'Type' => "Numeric" ), + +0x1006 => array( 'Name' => "Bracket", + 'Type' => "Numeric" ), + +0x100B => array( 'Name' => "Focus Mode", + 'Type' => "Numeric" ), + +0x100C => array( 'Name' => "Focus Distance", + 'Type' => "Numeric" ), + +0x100D => array( 'Name' => "Zoom", + 'Type' => "Numeric" ), + +0x100E => array( 'Name' => "Macro Focus", + 'Type' => "Numeric" ), + +0x100F => array( 'Name' => "Sharpness", + 'Type' => "Numeric" ), + +0x1011 => array( 'Name' => "Colour Matrix", + 'Type' => "Numeric" ), + +0x1012 => array( 'Name' => "Black Level", + 'Type' => "Numeric" ), + +0x1015 => array( 'Name' => "White Balance", + 'Type' => "Numeric" ), + +0x1017 => array( 'Name' => "Red Bias", + 'Type' => "Numeric" ), + +0x1018 => array( 'Name' => "Blue Bias", + 'Type' => "Numeric" ), + +0x101A => array( 'Name' => "Serial Number", + 'Type' => "Numeric" ), + +0x1023 => array( 'Name' => "Flash Bias", + 'Type' => "Numeric" ), + +0x1029 => array( 'Name' => "Contrast", + 'Type' => "Numeric" ), + +0x102A => array( 'Name' => "Sharpness Factor", + 'Type' => "Numeric" ), + +0x102B => array( 'Name' => "Colour Control", + 'Type' => "Numeric" ), + +0x102C => array( 'Name' => "Valid Bits", + 'Type' => "Numeric" ), + +0x102D => array( 'Name' => "Coring Filter", + 'Type' => "Numeric" ), + +0x102E => array( 'Name' => "Final Width", + 'Type' => "Numeric" ), + +0x102F => array( 'Name' => "Final Height", + 'Type' => "Numeric" ), + +0x1034 => array( 'Name' => "Compression Ratio", + 'Type' => "Numeric" ), + + + +); + + +/****************************************************************************** +* End of Global Variable: IFD_Tag_Definitions, Olympus +******************************************************************************/ + + + + + +?> \ No newline at end of file diff --git a/jpeg_metadata_tk/Makernotes/panasonic.php b/jpeg_metadata_tk/Makernotes/panasonic.php new file mode 100644 index 0000000..2da827f --- /dev/null +++ b/jpeg_metadata_tk/Makernotes/panasonic.php @@ -0,0 +1,292 @@ + array( 'Name' => "Quality Mode", + 'Type' => "Numeric" ), + +0x02 => array( 'Name' => "Version", + 'Type' => "String" ), + +0x1c => array( 'Name' => "Macro Mode", + 'Type' => "Lookup", + 1 => "On", + 2 => "Off" ), + +0x1f => array( 'Name' => "Record Mode", + 'Type' => "Lookup", + 1 => "Normal", + 2 => "Portrait", + 9 => "Macro" ), + +0xE00 => array( 'Name' => "Print Image Matching Info", + 'Type' => "PIM" ), + +); + +/****************************************************************************** +* End of Global Variable: IFD_Tag_Definitions, Panasonic +******************************************************************************/ + + + + + +?> diff --git a/jpeg_metadata_tk/Makernotes/ricoh.php b/jpeg_metadata_tk/Makernotes/ricoh.php new file mode 100644 index 0000000..f858bbc --- /dev/null +++ b/jpeg_metadata_tk/Makernotes/ricoh.php @@ -0,0 +1,415 @@ +"; + + // Replace the semicolon dividers with line break html tags + $output_str .= str_replace ( ";", "
\n", $Makernote_tag['Data'] ); + + // Close the html + $output_str .= ""; + + // Return the html + return $output_str; + } + // Check if this makernote is a Ricoh Empty makernote + else if ( $Makernote_tag['Makernote Type'] == "Ricoh Empty Makernote" ) + { + // Do Nothing + return ""; + } + else + { + // Don't recognise the Makernote type - not a Ricoh makernote + return FALSE; + } + + // shouldn't get here + return FALSE; +} + +/****************************************************************************** +* End of Function: get_Ricoh_Makernote_Html +******************************************************************************/ + + + + + + + + +/****************************************************************************** +* +* Function: get_Ricoh_Text_Value +* +* Description: Provides a text value for any tag marked as special for makernotes +* that this script can decode. Returns false if this is not a makernote +* that can be processed with this script +* +* Parameters: Exif_Tag - the element of an the Makernote array containing the +* tag in question, as returned from get_Ricoh_Makernote +* Tag_Definitions_Name - The name of the Tag Definitions group +* within the global array IFD_Tag_Definitions +* +* +* Returns: output - the text value for the tag +* FALSE - If this script could not decode the makernote, or if +* an error occured in decoding +* +******************************************************************************/ + +function get_Ricoh_Text_Value( $Exif_Tag, $Tag_Definitions_Name ) +{ + + // Check that this tag uses the Ricoh tags, otherwise it can't be decoded here + if ( $Tag_Definitions_Name == "Ricoh" ) + { + + // Process the tag acording to it's tag number, to produce a text value + if ( $Exif_Tag['Tag Number'] == 0x0002 ) // Version tag + { + $tmp = implode ( "\x00", $Exif_Tag['Data']); + return "\"" .HTML_UTF8_Escape( $tmp ) . "\" (" . bin2hex( $tmp ) . " hex)"; + } + + } + + // Unknown tag or tag definitions + return FALSE; + +} + +/****************************************************************************** +* End of Function: get_Ricoh_Text_Value +******************************************************************************/ + + + + + + + + + + + +/****************************************************************************** +* Global Variable: IFD_Tag_Definitions, Ricoh +* +* Contents: This global variable provides definitions of the known Ricoh +* Makernote tags, indexed by their tag number. +* +******************************************************************************/ + +$GLOBALS[ "IFD_Tag_Definitions" ]["Ricoh"] = array( + + +0x0001 => array( 'Name' => "Makernote Data Type", + 'Type' => "String" ), + +0x0002 => array( 'Name' => "Version", + 'Type' => "Special" ), + +0x0e00 => array( 'Name' => "Print Image Matching Info", + 'Type' => "PIM" ), + +0x2001 => array( 'Name' => "Ricoh Camera Info Makernote Sub-IFD", + 'Type' => "Special" ), + +); + +/****************************************************************************** +* End of Global Variable: IFD_Tag_Definitions, Ricoh +******************************************************************************/ + + + + + + + + +/****************************************************************************** +* Global Variable: IFD_Tag_Definitions, RicohSubIFD +* +* Contents: This global variable provides definitions of the known Ricoh +* Camera Info Sub-IFD Makernote tags, indexed by their tag number. +* +******************************************************************************/ + +$GLOBALS[ "IFD_Tag_Definitions" ]["RicohSubIFD"] = array( + +); + +/****************************************************************************** +* End of Global Variable: IFD_Tag_Definitions, RicohSubIFD +******************************************************************************/ + + + + + + +?> \ No newline at end of file diff --git a/jpeg_metadata_tk/Makernotes/sony.php b/jpeg_metadata_tk/Makernotes/sony.php new file mode 100644 index 0000000..2690d81 --- /dev/null +++ b/jpeg_metadata_tk/Makernotes/sony.php @@ -0,0 +1,244 @@ + array( 'Name' => "Print Image Matching Info", + 'Type' => "PIM" ), + +); + +/****************************************************************************** +* End of Global Variable: IFD_Tag_Definitions, Sony +******************************************************************************/ + + + + + + + + + + + +?> -- cgit v1.3