Changeset 4705 for extensions/AMetaData/JpegMetaData/Readers
- Timestamp:
- Jan 19, 2010, 12:31:32 AM (15 years ago)
- Location:
- extensions/AMetaData/JpegMetaData/Readers
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AMetaData/JpegMetaData/Readers/GenericReader.class.php
r4698 r4705 70 70 protected $nbEntries = 0; 71 71 protected $entries = Array(); 72 protected $headerSize = 0; 72 73 73 74 protected $data = null; -
extensions/AMetaData/JpegMetaData/Readers/IfdReader.class.php
r4698 r4705 106 106 $this->dataOffset=$offset; 107 107 108 $this->skipHeader( );108 $this->skipHeader($this->headerSize); 109 109 110 110 $dataPointer = $this->data->offset(); … … 338 338 case 0x010D: // DocumentName, tag 0x010D 339 339 case 0x010E: // ImageDescription, tag 0x010E 340 case 0x010F: // Make, tag 0x010F341 case 0x0110: // Model, tag 0x0110342 340 case 0x0131: // Software, tag 0x0131 343 341 case 0x013B: // Artist, tag 0x013B … … 351 349 */ 352 350 $returned=ConvertData::toStrings($values); 351 break; 352 case 0x010F: // Make, tag 0x010F 353 case 0x0110: // Model, tag 0x0110 354 /* Make and Model are null terminated strings 355 * memorize the maker & camera from the exif tag : it's used to 356 * recognize the Canon camera (no header in the maker note) 357 */ 358 $returned=ConvertData::toStrings($values); 359 MakerNotesSignatures::setExifMaker($returned); 353 360 break; 354 361 case 0x011A: // XResolution, tag 0x011A … … 487 494 case MakerNotesSignatures::OlympusHeader: 488 495 case MakerNotesSignatures::Olympus2Header: 489 $returned="Olympus ";496 $returned="Olympus is not implemented yet"; 490 497 break; 491 498 case MakerNotesSignatures::FujiFilmHeader: 492 $returned="FujiFilm ";499 $returned="FujiFilm is not implemented yet"; 493 500 break; 494 501 case MakerNotesSignatures::Nikon2Header: 495 502 case MakerNotesSignatures::Nikon3Header: 496 $returned="Nikon"; 503 require_once(JPEG_METADATA_DIR."Readers/NikonReader.class.php"); 504 $returned=new NikonReader($values, $valuesOffset, $this->byteOrder, $makerSignature); 497 505 break; 498 506 case MakerNotesSignatures::PanasonicHeader: 499 $returned="Panasonic ";507 $returned="Panasonic is not implemented yet"; 500 508 break; 501 509 case MakerNotesSignatures::PentaxHeader: … … 506 514 case MakerNotesSignatures::SigmaHeader: 507 515 case MakerNotesSignatures::Sigma2Header: 508 $returned="Sigma ";516 $returned="Sigma is not implemented yet"; 509 517 break; 510 518 case MakerNotesSignatures::SonyHeader: 511 $returned="Sony ";519 $returned="Sony is not implemented yet"; 512 520 break; 513 521 default: 514 $returned="unknown maker => ".ConvertData::toHexDump($values, $type, 16); 522 /* 523 * Canon maker notes don't have any header 524 * So, the only method to know if the maker note is from a Canon 525 * camera is looking the exif maker value equals "Canon" or 526 * the camera model contains "Canon" 527 */ 528 if(preg_match("/.*canon.*/i",MakerNotesSignatures::getExifMaker())) 529 { 530 require_once(JPEG_METADATA_DIR."Readers/CanonReader.class.php"); 531 $returned=new CanonReader($values, $valuesOffset, $this->byteOrder, ""); 532 } 533 else 534 { 535 $returned="unknown maker => ".ConvertData::toHexDump($values, $type, 16); 536 } 515 537 break; 516 538 } -
extensions/AMetaData/JpegMetaData/Readers/JpegReader.class.php
r4686 r4705 111 111 { 112 112 unset($this->appMarkerSegmentReader); 113 unset($this->fileHandler); 113 114 } 114 115 -
extensions/AMetaData/JpegMetaData/Readers/SegmentReader.class.php
r4698 r4705 71 71 } 72 72 73 function __destruct() 74 { 75 unset($this->data); 76 unset($this->isValid); 77 unset($this->isLoaded); 78 } 79 73 80 /** 74 81 * return true if the segment is valid -
extensions/AMetaData/JpegMetaData/Readers/TiffReader.class.php
r4698 r4705 111 111 function __destruct() 112 112 { 113 parent::__destruct(); 113 114 unset($this->IFDs); 114 115 } -
extensions/AMetaData/JpegMetaData/Readers/XmpReader.class.php
r4698 r4705 97 97 function __destruct() 98 98 { 99 unset($this->xmlData); 99 100 unset($this->xmpTag2Exif); 100 101 parent::__destruct();
Note: See TracChangeset
for help on using the changeset viewer.