Annotation of /trunk/lib/iptc/makernotes/nikon.php
Parent Directory
|
Revision Log
Revision 2 - (view) (download)
| 1 : | andphe | 2 | <?php |
| 2 : | /** | ||
| 3 : | * @package zOOmGallery | ||
| 4 : | * @author Mike de Boer <mailme@mikedeboer.nl> | ||
| 5 : | **/ | ||
| 6 : | /****************************************************************************** | ||
| 7 : | * | ||
| 8 : | * Filename: Nikon.php | ||
| 9 : | * | ||
| 10 : | * Description: Nikon Makernote Parser | ||
| 11 : | * Provides functions to decode an Nikon EXIF makernote and to interpret | ||
| 12 : | * the resulting array into html. | ||
| 13 : | * | ||
| 14 : | * Nikon Makernote Format: | ||
| 15 : | * | ||
| 16 : | * Type 1 | ||
| 17 : | * | ||
| 18 : | * Field Size Description | ||
| 19 : | * ---------------------------------------------------------------- | ||
| 20 : | * Header 8 Bytes "Nikon\x00\x01\x00" | ||
| 21 : | * IFD Data Variable Standard IFD Data using Nikon Type 1 Tags | ||
| 22 : | * ---------------------------------------------------------------- | ||
| 23 : | * | ||
| 24 : | * Type 2 | ||
| 25 : | * | ||
| 26 : | * Field Size Description | ||
| 27 : | * ---------------------------------------------------------------- | ||
| 28 : | * IFD Data Variable Standard IFD Data using Nikon Type 3 Tags | ||
| 29 : | * ---------------------------------------------------------------- | ||
| 30 : | * | ||
| 31 : | * Type 3 | ||
| 32 : | * | ||
| 33 : | * Field Size Description | ||
| 34 : | * ---------------------------------------------------------------- | ||
| 35 : | * Header 10 Bytes "Nikon\x00\x02\x10\x00\x00" | ||
| 36 : | * or | ||
| 37 : | * "Nikon\x00\x02\x00\x00\x00" | ||
| 38 : | * TIFF Data Variable TIFF header, with associated | ||
| 39 : | * Standard IFD Data using, Nikon | ||
| 40 : | * Type 3 Tags. Offsets are from | ||
| 41 : | * this second tiff header | ||
| 42 : | * ---------------------------------------------------------------- | ||
| 43 : | * | ||
| 44 : | * // Note: The Nikon Coolpix 775 uses the Fujifilm makernote format | ||
| 45 : | * | ||
| 46 : | * | ||
| 47 : | * | ||
| 48 : | * Author: Evan Hunter | ||
| 49 : | * | ||
| 50 : | * Date: 30/7/2004 | ||
| 51 : | * | ||
| 52 : | * Project: JPEG Metadata | ||
| 53 : | * | ||
| 54 : | * Revision: 1.00 | ||
| 55 : | * | ||
| 56 : | * URL: http://electronics.ozhiker.com | ||
| 57 : | * | ||
| 58 : | * Copyright: Copyright Evan Hunter 2004 | ||
| 59 : | * This file may be used freely for non-commercial purposes.For | ||
| 60 : | * commercial uses please contact the author: evan@ozhiker.com | ||
| 61 : | * | ||
| 62 : | ******************************************************************************/ | ||
| 63 : | // MOS Intruder Alerts | ||
| 64 : | defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); | ||
| 65 : | |||
| 66 : | |||
| 67 : | |||
| 68 : | // Add the parser and interpreter functions to the list of Makernote parsers and interpreters. | ||
| 69 : | |||
| 70 : | $GLOBALS['Makernote_Function_Array']['Read_Makernote_Tag'][] = "get_Nikon_Makernote"; | ||
| 71 : | $GLOBALS['Makernote_Function_Array']['get_Makernote_Text_Value'][] = "get_Nikon_Text_Value"; | ||
| 72 : | $GLOBALS['Makernote_Function_Array']['Interpret_Makernote_to_HTML'][] = "get_Nikon_Makernote_Html"; | ||
| 73 : | |||
| 74 : | |||
| 75 : | |||
| 76 : | |||
| 77 : | /****************************************************************************** | ||
| 78 : | * | ||
| 79 : | * Function: get_Nikon_Makernote | ||
| 80 : | * | ||
| 81 : | * Description: Decodes the Makernote tag and returns the new tag with the decoded | ||
| 82 : | * information attached. Returns false if this is not a makernote | ||
| 83 : | * that can be processed with this script | ||
| 84 : | * | ||
| 85 : | * Parameters: Makernote_Tag - the element of an EXIF array containing the | ||
| 86 : | * makernote, as returned from get_EXIF_JPEG | ||
| 87 : | * EXIF_Array - the entire EXIF array containing the | ||
| 88 : | * makernote, as returned from get_EXIF_JPEG, in | ||
| 89 : | * case more information is required for decoding | ||
| 90 : | * filehnd - an open file handle for the file containing the | ||
| 91 : | * makernote - does not have to be positioned at the | ||
| 92 : | * start of the makernote | ||
| 93 : | * Make_Field - The contents of the EXIF Make field, to aid | ||
| 94 : | * determining whether this script can decode | ||
| 95 : | * the makernote | ||
| 96 : | * | ||
| 97 : | * | ||
| 98 : | * Returns: Makernote_Tag - the Makernote_Tag from the parameters, but | ||
| 99 : | * modified to contain the decoded information | ||
| 100 : | * FALSE - If this script could not decode the makernote, or if | ||
| 101 : | * an error occured in decoding | ||
| 102 : | * | ||
| 103 : | ******************************************************************************/ | ||
| 104 : | |||
| 105 : | function get_Nikon_Makernote( $Makernote_Tag, $EXIF_Array, $filehnd, $Make_Field ) | ||
| 106 : | { | ||
| 107 : | // Check if the Make Field contains the word Nikon | ||
| 108 : | if ( stristr( $Make_Field, "Nikon" ) === FALSE ) | ||
| 109 : | { | ||
| 110 : | // Nikon not found in maker field - abort | ||
| 111 : | return FALSE; | ||
| 112 : | } | ||
| 113 : | |||
| 114 : | |||
| 115 : | // Check if the header exists at the start of the Makernote | ||
| 116 : | if ( substr( $Makernote_Tag['Data'],0 , 8 ) == "Nikon\x00\x01\x00" ) | ||
| 117 : | { | ||
| 118 : | // Nikon Type 1 Makernote | ||
| 119 : | |||
| 120 : | // Seek to the start of the IFD | ||
| 121 : | fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset'] + 8 ); | ||
| 122 : | |||
| 123 : | // Read the IFD(s) into an array | ||
| 124 : | $Makernote_Tag['Decoded Data'] = read_Multiple_IFDs( $filehnd, $Makernote_Tag['Tiff Offset'], $Makernote_Tag['ByteAlign'], "Nikon Type 1" ); | ||
| 125 : | |||
| 126 : | // Save some information into the Tag element to aid interpretation | ||
| 127 : | $Makernote_Tag['Decoded'] = TRUE; | ||
| 128 : | $Makernote_Tag['Makernote Type'] = "Nikon Type 1"; | ||
| 129 : | $Makernote_Tag['Makernote Tags'] = "Nikon Type 1"; | ||
| 130 : | |||
| 131 : | |||
| 132 : | // Return the new tag | ||
| 133 : | return $Makernote_Tag; | ||
| 134 : | |||
| 135 : | |||
| 136 : | } | ||
| 137 : | else if ( ( substr( $Makernote_Tag['Data'],0 , 10 ) == "Nikon\x00\x02\x10\x00\x00" ) || | ||
| 138 : | ( substr( $Makernote_Tag['Data'],0 , 10 ) == "Nikon\x00\x02\x00\x00\x00" ) ) | ||
| 139 : | { | ||
| 140 : | // Nikon Type 3 Makernote | ||
| 141 : | |||
| 142 : | // Seek to the start of the IFD | ||
| 143 : | fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset'] + 10 ); | ||
| 144 : | |||
| 145 : | // Read the TIFF header and IFD(s) into an array | ||
| 146 : | $Makernote_Tag['Decoded Data'] = process_TIFF_Header( $filehnd, "Nikon Type 3" ); | ||
| 147 : | |||
| 148 : | // Save some information into the Tag element to aid interpretation | ||
| 149 : | $Makernote_Tag['Makernote Type'] = "Nikon Type 3"; | ||
| 150 : | $Makernote_Tag['Makernote Tags'] = "Nikon Type 3"; | ||
| 151 : | $Makernote_Tag['Decoded'] = TRUE; | ||
| 152 : | |||
| 153 : | |||
| 154 : | // Return the new tag | ||
| 155 : | return $Makernote_Tag; | ||
| 156 : | } | ||
| 157 : | else if ( substr( $Makernote_Tag['Data'],0 , 8 ) == "FUJIFILM" ) | ||
| 158 : | { | ||
| 159 : | // Fuji Makernote - used by Nikon Coolpix 775 | ||
| 160 : | // Let the Fujifilm library handle it | ||
| 161 : | return False; | ||
| 162 : | } | ||
| 163 : | else | ||
| 164 : | { | ||
| 165 : | // No header - Nikon Type 2 | ||
| 166 : | |||
| 167 : | // Seek to the start of the IFD | ||
| 168 : | fseek($filehnd, $Makernote_Tag['Tiff Offset'] + $Makernote_Tag['Offset'] + 0 ); | ||
| 169 : | |||
| 170 : | // Read the IFD(s) into an array | ||
| 171 : | $Makernote_Tag['Decoded Data'] = read_Multiple_IFDs( $filehnd, $Makernote_Tag['Tiff Offset'], $Makernote_Tag['ByteAlign'], "Nikon Type 3" ); | ||
| 172 : | |||
| 173 : | // Save some information into the Tag element to aid interpretation | ||
| 174 : | $Makernote_Tag['Decoded'] = TRUE; | ||
| 175 : | $Makernote_Tag['Makernote Type'] = "Nikon Type 2"; | ||
| 176 : | $Makernote_Tag['Makernote Tags'] = "Nikon Type 3"; | ||
| 177 : | |||
| 178 : | |||
| 179 : | // Return the new tag | ||
| 180 : | return $Makernote_Tag; | ||
| 181 : | } | ||
| 182 : | |||
| 183 : | |||
| 184 : | } | ||
| 185 : | |||
| 186 : | /****************************************************************************** | ||
| 187 : | * End of Function: get_Nikon_Makernote | ||
| 188 : | ******************************************************************************/ | ||
| 189 : | |||
| 190 : | |||
| 191 : | |||
| 192 : | |||
| 193 : | |||
| 194 : | |||
| 195 : | |||
| 196 : | |||
| 197 : | |||
| 198 : | |||
| 199 : | |||
| 200 : | /****************************************************************************** | ||
| 201 : | * | ||
| 202 : | * Function: get_Nikon_Text_Value | ||
| 203 : | * | ||
| 204 : | * Description: Provides a text value for any tag marked as special for makernotes | ||
| 205 : | * that this script can decode. Returns false if this is not a makernote | ||
| 206 : | * that can be processed with this script | ||
| 207 : | * | ||
| 208 : | * Parameters: Exif_Tag - the element of an the Makernote array containing the | ||
| 209 : | * tag in question, as returned from get_Nikon_Makernote | ||
| 210 : | * Tag_Definitions_Name - The name of the Tag Definitions group | ||
| 211 : | * within the global array IFD_Tag_Definitions | ||
| 212 : | * | ||
| 213 : | * | ||
| 214 : | * Returns: output - the text value for the tag | ||
| 215 : | * FALSE - If this script could not decode the makernote, or if | ||
| 216 : | * an error occured in decoding | ||
| 217 : | * | ||
| 218 : | ******************************************************************************/ | ||
| 219 : | |||
| 220 : | function get_Nikon_Text_Value( $Exif_Tag, $Tag_Definitions_Name ) | ||
| 221 : | { | ||
| 222 : | |||
| 223 : | // Check that this tag uses the Nikon tags, otherwise it can't be interpreted here | ||
| 224 : | // And check which variety of tags | ||
| 225 : | if ( $Tag_Definitions_Name == "Nikon Type 1" ) | ||
| 226 : | { | ||
| 227 : | // No special tags for Nikon type 1 so far | ||
| 228 : | return FALSE; | ||
| 229 : | } | ||
| 230 : | else if ( $Tag_Definitions_Name == "Nikon Type 3" ) | ||
| 231 : | { | ||
| 232 : | // Nikon Type 3 special tag | ||
| 233 : | |||
| 234 : | // Process tag according to it's tag number | ||
| 235 : | |||
| 236 : | if ( $Exif_Tag['Tag Number'] == 1) // Nikon Makernote Version - some are binary, some are text | ||
| 237 : | { | ||
| 238 : | return "\"" .HTML_UTF8_Escape( $Exif_Tag['Data'] ) . "\" (" . bin2hex( $Exif_Tag['Data'] ) . " hex)"; | ||
| 239 : | } | ||
| 240 : | |||
| 241 : | else if ( ( $Exif_Tag['Tag Number'] == 2 ) || // ISO Speed Used | ||
| 242 : | ( $Exif_Tag['Tag Number'] == 19 ) ) // ISO Speed Requested | ||
| 243 : | { | ||
| 244 : | // ISO speed settings - should be the second of two values | ||
| 245 : | if ( count( $Exif_Tag['Data'] ) == 2 ) | ||
| 246 : | { | ||
| 247 : | // There are two values - display the second | ||
| 248 : | return $Exif_Tag['Data'][1] . " " . $Exif_Tag['Units']; | ||
| 249 : | } | ||
| 250 : | else | ||
| 251 : | { | ||
| 252 : | // There is not two values - display generic version of values | ||
| 253 : | return get_IFD_value_as_text( $Exif_Tag['Data'] ) . " " . $Exif_Tag['Units']; | ||
| 254 : | } | ||
| 255 : | } | ||
| 256 : | else if ( $Exif_Tag['Tag Number'] == 137 ) // Bracketing & Shooting Mode | ||
| 257 : | { | ||
| 258 : | // Add shooting mode to output from first two bits | ||
| 259 : | switch ( $Exif_Tag['Data'][0] & 0x03 ) | ||
| 260 : | { | ||
| 261 : | case 0x00: | ||
| 262 : | $outputstr = "Shooting Mode: Single Frame\n"; | ||
| 263 : | break; | ||
| 264 : | case 0x01: | ||
| 265 : | $outputstr = "Shooting Mode: Continuous\n"; | ||
| 266 : | break; | ||
| 267 : | case 0x02: | ||
| 268 : | $outputstr = "Shooting Mode: Self Timer\n"; | ||
| 269 : | break; | ||
| 270 : | case 0x03: | ||
| 271 : | $outputstr = "Shooting Mode: Remote??\n"; | ||
| 272 : | break; | ||
| 273 : | default: | ||
| 274 : | $outputstr = "Shooting Mode: Unknown\n"; | ||
| 275 : | break; | ||
| 276 : | } | ||
| 277 : | |||
| 278 : | // Add flash bracketing to output from fifth bit | ||
| 279 : | if ( ( $Exif_Tag['Data'][0] & 0x10 ) == 0x10 ) | ||
| 280 : | { | ||
| 281 : | $outputstr .= "AE/Flash Bracketing On\n"; | ||
| 282 : | } | ||
| 283 : | else | ||
| 284 : | { | ||
| 285 : | $outputstr .= "AE/Flash Bracketing Off\n"; | ||
| 286 : | } | ||
| 287 : | |||
| 288 : | // Add white balance bracketing to output from seventh bit | ||
| 289 : | if ( ( $Exif_Tag['Data'][0] & 0x40 ) == 0x40 ) | ||
| 290 : | { | ||
| 291 : | $outputstr .= "White Balance Bracketing On\n"; | ||
| 292 : | } | ||
| 293 : | else | ||
| 294 : | { | ||
| 295 : | $outputstr .= "White Balance Bracketing Off\n"; | ||
| 296 : | } | ||
| 297 : | |||
| 298 : | // Return the output | ||
| 299 : | return $outputstr; | ||
| 300 : | |||
| 301 : | } | ||
| 302 : | else if ( $Exif_Tag['Tag Number'] == 136 ) // Auto Focus Area | ||
| 303 : | { | ||
| 304 : | // Create a string to receive the output | ||
| 305 : | $outputstr = ""; | ||
| 306 : | |||
| 307 : | // If all zeros, this could be manual focus | ||
| 308 : | if ( $Exif_Tag['Data'] == "\x00\x00\x00\x00" ) | ||
| 309 : | { | ||
| 310 : | $outputstr .= "Manual Focus, or\n"; | ||
| 311 : | } | ||
| 312 : | |||
| 313 : | // Add AF mode according to the first byte | ||
| 314 : | switch ( ord($Exif_Tag['Data']{0}) ) | ||
| 315 : | { | ||
| 316 : | case 0x00: | ||
| 317 : | $outputstr .= "Auto Focus Mode: Single Area\n"; | ||
| 318 : | break; | ||
| 319 : | case 0x01: | ||
| 320 : | $outputstr .= "Auto Focus Mode: Dynamic Area\n"; | ||
| 321 : | break; | ||
| 322 : | case 0x02: | ||
| 323 : | $outputstr .= "Auto Focus Mode: Closest Subject\n"; | ||
| 324 : | break; | ||
| 325 : | default: | ||
| 326 : | $outputstr .= "Auto Focus Mode: Unknown AF Mode\n"; | ||
| 327 : | break; | ||
| 328 : | } | ||
| 329 : | |||
| 330 : | // Add AF area according to second byte | ||
| 331 : | switch ( ord($Exif_Tag['Data']{1}) ) | ||
| 332 : | { | ||
| 333 : | case 0x00: | ||
| 334 : | $outputstr .= "Auto Focus Area Selected: Centre\n"; | ||
| 335 : | break; | ||
| 336 : | case 0x01: | ||
| 337 : | $outputstr .= "Auto Focus Area Selected: Top\n"; | ||
| 338 : | break; | ||
| 339 : | case 0x02: | ||
| 340 : | $outputstr .= "Auto Focus Area Selected: Bottom\n"; | ||
| 341 : | break; | ||
| 342 : | case 0x03: | ||
| 343 : | $outputstr .= "Auto Focus Area Selected: Left\n"; | ||
| 344 : | break; | ||
| 345 : | case 0x04: | ||
| 346 : | $outputstr .= "Auto Focus Area Selected: Right\n"; | ||
| 347 : | break; | ||
| 348 : | } | ||
| 349 : | |||
| 350 : | // Add properly focused areas to output according to byte 3 bits | ||
| 351 : | |||
| 352 : | $outputstr .= "Properly Focused Area(s): "; | ||
| 353 : | if ( ord($Exif_Tag['Data']{3}) == 0x00 ) | ||
| 354 : | { | ||
| 355 : | $outputstr .= "None"; | ||
| 356 : | } | ||
| 357 : | if ( ( ord($Exif_Tag['Data']{3}) & 0x01 ) == 0x01 ) | ||
| 358 : | { | ||
| 359 : | $outputstr .= "Centre "; | ||
| 360 : | } | ||
| 361 : | if ( ( ord($Exif_Tag['Data']{3}) & 0x02 ) == 0x02 ) | ||
| 362 : | { | ||
| 363 : | $outputstr .= "Top "; | ||
| 364 : | } | ||
| 365 : | if ( ( ord($Exif_Tag['Data']{3}) & 0x04 ) == 0x04 ) | ||
| 366 : | { | ||
| 367 : | $outputstr .= "Bottom "; | ||
| 368 : | } | ||
| 369 : | if ( ( ord($Exif_Tag['Data']{3}) & 0x08 ) == 0x08 ) | ||
| 370 : | { | ||
| 371 : | $outputstr .= "Left "; | ||
| 372 : | } | ||
| 373 : | if ( ( ord($Exif_Tag['Data']{3}) & 0x10 ) == 0x10 ) | ||
| 374 : | { | ||
| 375 : | $outputstr .= "Right "; | ||
| 376 : | } | ||
| 377 : | $outputstr .= "\n"; | ||
| 378 : | |||
| 379 : | // return the string | ||
| 380 : | return $outputstr; | ||
| 381 : | } | ||
| 382 : | else | ||
| 383 : | { | ||
| 384 : | // Unknown special tag | ||
| 385 : | return FALSE; | ||
| 386 : | } | ||
| 387 : | } | ||
| 388 : | |||
| 389 : | |||
| 390 : | return FALSE; | ||
| 391 : | } | ||
| 392 : | |||
| 393 : | /****************************************************************************** | ||
| 394 : | * End of Function: get_Nikon_Text_Value | ||
| 395 : | ******************************************************************************/ | ||
| 396 : | |||
| 397 : | |||
| 398 : | |||
| 399 : | |||
| 400 : | /****************************************************************************** | ||
| 401 : | * | ||
| 402 : | * Function: get_Nikon_Makernote_Html | ||
| 403 : | * | ||
| 404 : | * Description: Attempts to interpret a makernote into html. Returns false if | ||
| 405 : | * it is not a makernote that can be processed with this script | ||
| 406 : | * | ||
| 407 : | * Parameters: Makernote_Tag - the element of an EXIF array containing the | ||
| 408 : | * makernote, as returned from get_EXIF_JPEG | ||
| 409 : | * filename - the name of the JPEG file being processed ( used | ||
| 410 : | * by scripts which display embedded thumbnails) | ||
| 411 : | * | ||
| 412 : | * | ||
| 413 : | * Returns: output - the html representing the makernote | ||
| 414 : | * FALSE - If this script could not interpret the makernote, or if | ||
| 415 : | * an error occured in decoding | ||
| 416 : | * | ||
| 417 : | ******************************************************************************/ | ||
| 418 : | |||
| 419 : | function get_Nikon_Makernote_Html( $Makernote_tag, $filename ) | ||
| 420 : | { | ||
| 421 : | |||
| 422 : | // Check that this is a Nikon Makernote, otherwise it can't be interpreted here | ||
| 423 : | if ( ( $Makernote_tag['Makernote Type'] != "Nikon Type 1" ) && | ||
| 424 : | ( $Makernote_tag['Makernote Type'] != "Nikon Type 2" ) && | ||
| 425 : | ( $Makernote_tag['Makernote Type'] != "Nikon Type 3" ) ) | ||
| 426 : | { | ||
| 427 : | // Not a Nikon Makernote - cannot interpret it - abort | ||
| 428 : | return FALSE;; | ||
| 429 : | } | ||
| 430 : | |||
| 431 : | // Interpret the IFD and return the HTML | ||
| 432 : | return interpret_IFD( $Makernote_tag['Decoded Data'][0], $filename ); | ||
| 433 : | } | ||
| 434 : | |||
| 435 : | /****************************************************************************** | ||
| 436 : | * End of Function: get_Nikon_Makernote_Html | ||
| 437 : | ******************************************************************************/ | ||
| 438 : | |||
| 439 : | |||
| 440 : | |||
| 441 : | |||
| 442 : | |||
| 443 : | |||
| 444 : | |||
| 445 : | |||
| 446 : | |||
| 447 : | |||
| 448 : | |||
| 449 : | |||
| 450 : | |||
| 451 : | |||
| 452 : | /****************************************************************************** | ||
| 453 : | * Global Variable: IFD_Tag_Definitions, Nikon Type 1 | ||
| 454 : | * | ||
| 455 : | * Contents: This global variable provides definitions of the known Nikon Type 1 | ||
| 456 : | * Makernote tags, indexed by their tag number. | ||
| 457 : | * | ||
| 458 : | ******************************************************************************/ | ||
| 459 : | |||
| 460 : | $GLOBALS[ "IFD_Tag_Definitions" ]["Nikon Type 1"] = array( | ||
| 461 : | |||
| 462 : | |||
| 463 : | 3 => array( 'Name' => "Quality", | ||
| 464 : | 'Description' => "1: VGA Basic, 2: VGA Normal, 3: VGA Fine, 4: SXGA Basic, 5: SXGA Normal, 6: SXGA Fine", | ||
| 465 : | 'Type' => "Lookup", | ||
| 466 : | 1 => "VGA (640x480) Basic", | ||
| 467 : | 2 => "VGA (640x480) Normal", | ||
| 468 : | 3 => "VGA (640x480) Fine", | ||
| 469 : | 4 => "SXGA (1280x960) Basic", | ||
| 470 : | 5 => "SXGA (1280x960) Normal", | ||
| 471 : | 6 => "SXGA (1280x960) Fine", | ||
| 472 : | 7 => "Unknown, Possibly XGA (1024x768) Basic", | ||
| 473 : | 8 => "Unknown, Possibly XGA (1024x768) Basic", | ||
| 474 : | 9 => "Unknown, Possibly XGA (1024x768) Basic", | ||
| 475 : | 10 => "UXGA (1600x1200) Basic", | ||
| 476 : | 11 => "UXGA (1600x1200) Normal", | ||
| 477 : | 12 => "UXGA (1600x1200) Fine" ), | ||
| 478 : | |||
| 479 : | 4 => array( 'Name' => "Colour Mode", | ||
| 480 : | 'Description' => "1: Colour, 2: Monochrome.", | ||
| 481 : | 'Type' => "Lookup", | ||
| 482 : | 1 => "Colour", | ||
| 483 : | 2 => "Monochrome" ), | ||
| 484 : | |||
| 485 : | 5 => array( 'Name' => "Image Adjustment", | ||
| 486 : | 'Description' => "0: Normal, 1: Bright+, 2: Bright-, 3: Contrast+, 4: Contrast-.", | ||
| 487 : | 'Type' => "Lookup", | ||
| 488 : | 0 => "Normal", | ||
| 489 : | 1 => "Bright+", | ||
| 490 : | 2 => "Bright-", | ||
| 491 : | 3 => "Contrast+", | ||
| 492 : | 4 => "Contrast-" ), | ||
| 493 : | |||
| 494 : | 6 => array( 'Name' => "CCD Sensitivity", | ||
| 495 : | 'Description' => "0: ISO80, 2: ISO160, 4: ISO320, 5: ISO100", | ||
| 496 : | 'Type' => "Lookup", | ||
| 497 : | 0 => "ISO 80", | ||
| 498 : | 2 => "ISO 160", | ||
| 499 : | 4 => "ISO 320", | ||
| 500 : | 5 => "ISO 100" ), | ||
| 501 : | |||
| 502 : | 7 => array( 'Name' => "White Balance", | ||
| 503 : | 'Description' => "0: Auto, 1: Preset, 2: Daylight, 3: Incandescense, 4: Fluorescence, 5: Cloudy, 6: SpeedLight", | ||
| 504 : | 'Type' => "Lookup", | ||
| 505 : | 0 => "Auto", | ||
| 506 : | 1 => "Preset", | ||
| 507 : | 2 => "Daylight", | ||
| 508 : | 3 => "Incandescense", | ||
| 509 : | 4 => "Flourescence", | ||
| 510 : | 5 => "Cloudy", | ||
| 511 : | 6 => "Speedlight" ), | ||
| 512 : | |||
| 513 : | 8 => array( 'Name' => "Focus", | ||
| 514 : | 'Description' => "If infinite focus, value is '1/0'.", | ||
| 515 : | 'Type' => "Numeric" ), | ||
| 516 : | |||
| 517 : | 10 => array( 'Name' => "Digital Zoom", | ||
| 518 : | 'Description' => "'160/100' means 1.6x digital zoom, '0/100' means no digital zoom (optical zoom only).", | ||
| 519 : | 'Type' => "Numeric" ), | ||
| 520 : | |||
| 521 : | 11 => array( 'Name' => "Converter", | ||
| 522 : | 'Description' => "If Fisheye Converter is used, value is 1", | ||
| 523 : | 'Type' => "Lookup", | ||
| 524 : | 0 => "No Converter Used", | ||
| 525 : | 1 => "Fish-eye Converter Used" ) | ||
| 526 : | |||
| 527 : | ); | ||
| 528 : | |||
| 529 : | /****************************************************************************** | ||
| 530 : | * End of Global Variable: IFD_Tag_Definitions, Nikon Type 1 | ||
| 531 : | ******************************************************************************/ | ||
| 532 : | |||
| 533 : | |||
| 534 : | |||
| 535 : | |||
| 536 : | |||
| 537 : | /****************************************************************************** | ||
| 538 : | * Global Variable: IFD_Tag_Definitions, Nikon Type 3 | ||
| 539 : | * | ||
| 540 : | * Contents: This global variable provides definitions of the known Nikon Type 3 | ||
| 541 : | * Makernote tags, indexed by their tag number. | ||
| 542 : | * | ||
| 543 : | ******************************************************************************/ | ||
| 544 : | |||
| 545 : | $GLOBALS[ "IFD_Tag_Definitions" ]["Nikon Type 3"] = array( | ||
| 546 : | |||
| 547 : | |||
| 548 : | 1 => array( 'Name' => "Nikon Makernote Version", | ||
| 549 : | 'Type' => "Special" ), | ||
| 550 : | |||
| 551 : | 2 => array( 'Name' => "ISO Speed Used", | ||
| 552 : | 'Type' => "Special" ), | ||
| 553 : | |||
| 554 : | 3 => array( 'Name' => "Colour Mode", | ||
| 555 : | 'Type' => "String" ), | ||
| 556 : | |||
| 557 : | 4 => array( 'Name' => "Quality", | ||
| 558 : | 'Type' => "String" ), | ||
| 559 : | |||
| 560 : | 5 => array( 'Name' => "White Balance", | ||
| 561 : | 'Type' => "String" ), | ||
| 562 : | |||
| 563 : | 6 => array( 'Name' => "Sharpening", | ||
| 564 : | 'Type' => "String" ), | ||
| 565 : | |||
| 566 : | 7 => array( 'Name' => "Focus Mode", | ||
| 567 : | 'Type' => "String" ), | ||
| 568 : | |||
| 569 : | 8 => array( 'Name' => "Flash Setting", | ||
| 570 : | 'Type' => "String" ), | ||
| 571 : | |||
| 572 : | 9 => array( 'Name' => "Auto Flash Mode", | ||
| 573 : | 'Type' => "String" ), | ||
| 574 : | |||
| 575 : | 11 => array( 'Name' => "White Balance Bias Value", | ||
| 576 : | 'Type' => "Numeric", | ||
| 577 : | 'Units' => "(Units Approx: 100 Mired per increment)" ), | ||
| 578 : | |||
| 579 : | 12 => array( 'Name' => "White Balance Red, Blue Coefficients?", | ||
| 580 : | 'Type' => "Numeric" ), | ||
| 581 : | |||
| 582 : | 15 => array( 'Name' => "ISO Selection?", | ||
| 583 : | 'Type' => "String" ), | ||
| 584 : | |||
| 585 : | |||
| 586 : | 18 => array( 'Name' => "Flash Compensation", | ||
| 587 : | 'Type' => "Lookup", | ||
| 588 : | 0x06 => "+1.0 EV", | ||
| 589 : | 0x04 => "+0.7 EV", | ||
| 590 : | 0x03 => "+0.5 EV", | ||
| 591 : | 0x02 => "+0.3 EV", | ||
| 592 : | 0x00 => "0.0 EV", | ||
| 593 : | 0xfe => "-0.3 EV", | ||
| 594 : | 0xfd => "-0.5 EV", | ||
| 595 : | 0xfc => "-0.7 EV", | ||
| 596 : | 0xfa => "-1.0 EV", | ||
| 597 : | 0xf8 => "-1.3 EV", | ||
| 598 : | 0xf7 => "-1.5 EV", | ||
| 599 : | 0xf6 => "-1.7 EV", | ||
| 600 : | 0xf4 => "-2.0 EV", | ||
| 601 : | 0xf2 => "-2.3 EV", | ||
| 602 : | 0xf1 => "-2.5 EV", | ||
| 603 : | 0xf0 => "-2.7 EV", | ||
| 604 : | 0xee => "-3.0 EV" ), | ||
| 605 : | |||
| 606 : | 19 => array( 'Name' => "ISO Speed Requested", | ||
| 607 : | 'Type' => "Special", | ||
| 608 : | 'Units' => "(May be different to Speed Used when Auto ISO is on)" ), | ||
| 609 : | |||
| 610 : | |||
| 611 : | 22 => array( 'Name' => "Photo corner coordinates", | ||
| 612 : | 'Type' => "Numeric", | ||
| 613 : | 'Units' => "Pixels" ), | ||
| 614 : | |||
| 615 : | 24 => array( 'Name' => "Flash Bracket Compensation Applied", | ||
| 616 : | 'Type' => "Lookup", | ||
| 617 : | 0x06 => "+1.0 EV", | ||
| 618 : | 0x04 => "+0.7 EV", | ||
| 619 : | 0x03 => "+0.5 EV", | ||
| 620 : | 0x02 => "+0.3 EV", | ||
| 621 : | 0x00 => "0.0 EV", | ||
| 622 : | 0xfe => "-0.3 EV", | ||
| 623 : | 0xfd => "-0.5 EV", | ||
| 624 : | 0xfc => "-0.7 EV", | ||
| 625 : | 0xfa => "-1.0 EV", | ||
| 626 : | 0xf8 => "-1.3 EV", | ||
| 627 : | 0xf7 => "-1.5 EV", | ||
| 628 : | 0xf6 => "-1.7 EV", | ||
| 629 : | 0xf4 => "-2.0 EV", | ||
| 630 : | 0xf2 => "-2.3 EV", | ||
| 631 : | 0xf1 => "-2.5 EV", | ||
| 632 : | 0xf0 => "-2.7 EV", | ||
| 633 : | 0xee => "-3.0 EV" ), | ||
| 634 : | |||
| 635 : | 25 => array( 'Name' => "AE Bracket Compensation Applied", | ||
| 636 : | 'Type' => "Numeric", | ||
| 637 : | 'Units' => "EV" ), | ||
| 638 : | |||
| 639 : | 128 => array( 'Name' => "Image Adjustment?", | ||
| 640 : | 'Type' => "String" ), | ||
| 641 : | |||
| 642 : | 129 => array( 'Name' => "Tone Compensation (Contrast)", | ||
| 643 : | 'Type' => "String" ), | ||
| 644 : | |||
| 645 : | 130 => array( 'Name' => "Auxiliary Lens (Adapter)", | ||
| 646 : | 'Type' => "String" ), | ||
| 647 : | |||
| 648 : | 131 => array( 'Name' => "Lens Type?", | ||
| 649 : | 'Type' => "Lookup", | ||
| 650 : | 6 => "Nikon D series Lens", | ||
| 651 : | 14 => "Nikon G series Lens" ), | ||
| 652 : | |||
| 653 : | 132 => array( 'Name' => "Lens Min/Max Focal Length, Min/Max Aperture", | ||
| 654 : | 'Type' => "Numeric", | ||
| 655 : | 'Units' => " mm, mm, F#, F#" ), | ||
| 656 : | |||
| 657 : | 133 => array( 'Name' => "Manual Focus Distance?", | ||
| 658 : | 'Type' => "Numeric"), | ||
| 659 : | |||
| 660 : | 134 => array( 'Name' => "Digital Zoom Factor?", | ||
| 661 : | 'Type' => "Numeric" ), | ||
| 662 : | |||
| 663 : | 135 => array( 'Name' => "Flash Used", | ||
| 664 : | 'Type' => "Lookup", | ||
| 665 : | 0 => "Flash Not Used", | ||
| 666 : | 9 => "Flash Fired" ), | ||
| 667 : | |||
| 668 : | 136 => array( 'Name' => "Auto Focus Area", | ||
| 669 : | 'Description' => "byte 1 : AF Mode: 00 = single area, 01 = Dynamic Area, 02 = Closest Subject\n | ||
| 670 : | byte 2 : AF Area Selected : 00 = Centre, 01 = Top, 02 = Bottom, 03 = Left, 04 = Right\n | ||
| 671 : | byte 3 : Unknown, always zero\n | ||
| 672 : | byte 4 : Properly focused Area(s) : bit 0 = Centre, bit 1 = Top, bit 2 = Bottom, bit 3 = Left, bit 4 = Right", | ||
| 673 : | 'Type' => "Special" ), | ||
| 674 : | |||
| 675 : | 137 => array( 'Name' => "Bracketing & Shooting Mode", | ||
| 676 : | 'Description' => "bit 0&1 (0 = single frame, 1 = continuous,2=timer, 3=remote timer? 4 = remote?\n | ||
| 677 : | bit 4, Bracketing on or off\n | ||
| 678 : | bit 6, white Balance Bracketing on", | ||
| 679 : | 'Type' => "Special" ), | ||
| 680 : | |||
| 681 : | 141 => array( 'Name' => "Colour Mode", | ||
| 682 : | 'Description' =>"1a = Portrait sRGB, 2 = Adobe RGB, 3a = Landscape sRGB", | ||
| 683 : | 'Type' => "String" ), | ||
| 684 : | |||
| 685 : | 143 => array( 'Name' => "Scene Mode?", | ||
| 686 : | 'Type' => "Numeric" ), | ||
| 687 : | |||
| 688 : | 144 => array( 'Name' => "Lighting Type", | ||
| 689 : | 'Type' => "String" ), | ||
| 690 : | |||
| 691 : | 146 => array( 'Name' => "Hue Adjustment", | ||
| 692 : | 'Type' => "Numeric", | ||
| 693 : | 'Units' => "Degrees" ), | ||
| 694 : | |||
| 695 : | 148 => array( 'Name' => "Saturation?", | ||
| 696 : | 'Type' => "Lookup", | ||
| 697 : | -3 => "Black and White", | ||
| 698 : | -2 => "-2", | ||
| 699 : | -1 => "-1", | ||
| 700 : | 0 => "Normal", | ||
| 701 : | 1 => "+1", | ||
| 702 : | 2 => "+2" ), | ||
| 703 : | |||
| 704 : | 149 => array( 'Name' => "Noise Reduction", | ||
| 705 : | 'Type' => "String" ), | ||
| 706 : | |||
| 707 : | 167 => array( 'Name' => "Total Number of Shutter Releases for Camera", | ||
| 708 : | 'Type' => "Numeric", | ||
| 709 : | 'Units' => "Shutter Releases" ), | ||
| 710 : | |||
| 711 : | 169 => array( 'Name' => "Image optimisation", | ||
| 712 : | 'Type' => "String" ), | ||
| 713 : | |||
| 714 : | 170 => array( 'Name' => "Saturation", | ||
| 715 : | 'Type' => "String" ), | ||
| 716 : | |||
| 717 : | 171 => array( 'Name' => "Digital Vari-Program", | ||
| 718 : | 'Type' => "String" ) | ||
| 719 : | |||
| 720 : | |||
| 721 : | // Tags that exist but are unknown: 10, 13, 14, 16, 17, 23, 24, 138, 139, 145, | ||
| 722 : | // 151, 152, 160, 162 163, 165, 166, 168 | ||
| 723 : | |||
| 724 : | |||
| 725 : | ); | ||
| 726 : | |||
| 727 : | /****************************************************************************** | ||
| 728 : | * End of Global Variable: IFD_Tag_Definitions, Nikon Type 3 | ||
| 729 : | ******************************************************************************/ | ||
| 730 : | |||
| 731 : | |||
| 732 : | |||
| 733 : | ?> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

