Esempio n. 1
0
 function __construct($min, $max)
 {
     Pel::setStrictParsing(true);
     $this->min = $min;
     $this->max = $max;
     parent::__construct('PEL Exif Number Tests');
 }
Esempio n. 2
0
 function testRead()
 {
     Pel::clearExceptions();
     Pel::setStrictParsing(false);
     $jpeg = new PelJpeg(dirname(__FILE__) . '/no-exif.jpg');
     $exif = $jpeg->getExif();
     $this->assertNull($exif);
     $this->assertTrue(count(Pel::getExceptions()) == 0);
 }
Esempio n. 3
0
 function testWriteRead()
 {
     Pel::setStrictParsing(true);
     $ifd = new PelIfd(PelIfd::IFD0);
     $this->assertTrue($ifd->isLastIfd());
     foreach ($this->entries as $entry) {
         $ifd->addEntry($entry);
     }
     $tiff = new PelTiff();
     $this->assertNull($tiff->getIfd());
     $tiff->setIfd($ifd);
     $this->assertNotNull($tiff->getIfd());
     $exif = new PelExif();
     $this->assertNull($exif->getTiff());
     $exif->setTiff($tiff);
     $this->assertNotNull($exif->getTiff());
     $jpeg = new PelJpeg(dirname(__FILE__) . '/no-exif.jpg');
     $this->assertNull($jpeg->getExif());
     $jpeg->setExif($exif);
     $this->assertNotNull($jpeg->getExif());
     $jpeg->saveFile('test-output.jpg');
     $this->assertTrue(file_exists('test-output.jpg'));
     $this->assertTrue(filesize('test-output.jpg') > 0);
     /* Now read the file and see if the entries are still there. */
     $jpeg = new PelJpeg('test-output.jpg');
     $exif = $jpeg->getExif();
     $this->assertIsA($exif, 'PelExif');
     $tiff = $exif->getTiff();
     $this->assertIsA($tiff, 'PelTiff');
     $ifd = $tiff->getIfd();
     $this->assertIsA($ifd, 'PelIfd');
     $this->assertEqual($ifd->getType(), PelIfd::IFD0);
     $this->assertTrue($ifd->isLastIfd());
     foreach ($this->entries as $entry) {
         $this->assertEqual($ifd->getEntry($entry->getTag())->getValue(), $entry->getValue());
     }
     unlink('test-output.jpg');
 }
Esempio n. 4
0
/* $Id: dump-image.php,v 1.1 2008/11/27 10:02:29 manolis Exp $ */
error_reporting(E_ALL);
/* Make PEL speak the users language, if it is available. */
setlocale(LC_ALL, '');
require_once dirname(__FILE__) . '/../PelDataWindow.php';
require_once dirname(__FILE__) . '/../PelJpeg.php';
require_once dirname(__FILE__) . '/../PelTiff.php';
$prog = array_shift($argv);
$file = '';
while (!empty($argv)) {
    switch ($argv[0]) {
        case '-d':
            Pel::setDebug(true);
            break;
        case '-s':
            Pel::setStrictParsing(true);
            break;
        default:
            $file = $argv[0];
            break;
    }
    array_shift($argv);
}
if (empty($file)) {
    printf("Usage: %s [-d] [-s] <filename>\n", $prog);
    print "Optional arguments:\n";
    print "  -d        turn debug output on.\n";
    print "  -s        turn strict parsing on (halt on errors).\n";
    print "Mandatory arguments:\n";
    print "  filename  a JPEG or TIFF image.\n";
    exit(1);
    function testRead()
    {
        Pel::clearExceptions();
        Pel::setStrictParsing(false);
        $jpeg = new PelJpeg(dirname(__FILE__) . '/olympus-c50z.jpg');
        $exif = $jpeg->getExif();
        $this->assertIsA($exif, 'PelExif');
        $tiff = $exif->getTiff();
        $this->assertIsA($tiff, 'PelTiff');
        /* The first IFD. */
        $ifd0 = $tiff->getIfd();
        $this->assertIsA($ifd0, 'PelIfd');
        /* Start of IDF $ifd0. */
        $this->assertEqual(count($ifd0->getEntries()), 11);
        $entry = $ifd0->getEntry(270);
        // ImageDescription
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'OLYMPUS DIGITAL CAMERA         ');
        $this->assertEqual($entry->getText(), 'OLYMPUS DIGITAL CAMERA         ');
        $entry = $ifd0->getEntry(271);
        // Make
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'OLYMPUS OPTICAL CO.,LTD');
        $this->assertEqual($entry->getText(), 'OLYMPUS OPTICAL CO.,LTD');
        $entry = $ifd0->getEntry(272);
        // Model
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'X-2,C-50Z       ');
        $this->assertEqual($entry->getText(), 'X-2,C-50Z       ');
        $entry = $ifd0->getEntry(274);
        // Orientation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'top - left');
        $entry = $ifd0->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 144, 1 => 1));
        $this->assertEqual($entry->getText(), '144/1');
        $entry = $ifd0->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 144, 1 => 1));
        $this->assertEqual($entry->getText(), '144/1');
        $entry = $ifd0->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        $entry = $ifd0->getEntry(305);
        // Software
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), '28-1012                        ');
        $this->assertEqual($entry->getText(), '28-1012                        ');
        $entry = $ifd0->getEntry(306);
        // DateTime
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), false);
        $this->assertEqual($entry->getText(), '0000:00:00 00:00:00');
        $entry = $ifd0->getEntry(531);
        // YCbCrPositioning
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'co-sited');
        $entry = $ifd0->getEntry(50341);
        // PrintIM
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), 'PrintIM0250ˆ	
Ð
èÿ€€€€€€€€€	\'\'—\'°\'\'^\'‹\'Ë\'å\'');
        $this->assertEqual($entry->getText(), '(undefined)');
        /* Sub IFDs of $ifd0. */
        $this->assertEqual(count($ifd0->getSubIfds()), 1);
        $ifd0_0 = $ifd0->getSubIfd(2);
        // IFD Exif
        $this->assertIsA($ifd0_0, 'PelIfd');
        /* Start of IDF $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getEntries()), 30);
        $entry = $ifd0_0->getEntry(33434);
        // ExposureTime
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 1, 1 => 80));
        $this->assertEqual($entry->getText(), '1/80 sec.');
        $entry = $ifd0_0->getEntry(33437);
        // FNumber
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 45, 1 => 10));
        $this->assertEqual($entry->getText(), 'f/4.5');
        $entry = $ifd0_0->getEntry(34850);
        // ExposureProgram
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 5);
        $this->assertEqual($entry->getText(), 'Creative program (biased toward depth of field)');
        $entry = $ifd0_0->getEntry(34855);
        // ISOSpeedRatings
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 80);
        $this->assertEqual($entry->getText(), '80');
        $entry = $ifd0_0->getEntry(36864);
        // ExifVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 2.2);
        $this->assertEqual($entry->getText(), 'Exif Version 2.2');
        $entry = $ifd0_0->getEntry(36867);
        // DateTimeOriginal
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), false);
        $this->assertEqual($entry->getText(), '0000:00:00 00:00:00');
        $entry = $ifd0_0->getEntry(36868);
        // DateTimeDigitized
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), false);
        $this->assertEqual($entry->getText(), '0000:00:00 00:00:00');
        $entry = $ifd0_0->getEntry(37121);
        // ComponentsConfiguration
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'Y Cb Cr -');
        $entry = $ifd0_0->getEntry(37380);
        // ExposureBiasValue
        $this->assertIsA($entry, 'PelEntrySRational');
        $this->assertEqual($entry->getValue(), array(0 => 0, 1 => 10));
        $this->assertEqual($entry->getText(), '0.0');
        $entry = $ifd0_0->getEntry(37381);
        // MaxApertureValue
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 300, 1 => 100));
        $this->assertEqual($entry->getText(), '300/100');
        $entry = $ifd0_0->getEntry(37383);
        // MeteringMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 5);
        $this->assertEqual($entry->getText(), 'Pattern');
        $entry = $ifd0_0->getEntry(37384);
        // LightSource
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Unknown');
        $entry = $ifd0_0->getEntry(37385);
        // Flash
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 25);
        $this->assertEqual($entry->getText(), 'Flash fired, auto mode.');
        $entry = $ifd0_0->getEntry(37386);
        // FocalLength
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 1883, 1 => 100));
        $this->assertEqual($entry->getText(), '18.8 mm');
        $entry = $ifd0_0->getEntry(37500);
        // MakerNote
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), 'OLYMP>$8@HT	 Z
|
„
Œ
”
¤	
¸
QQ	6Hpp@&@ Üè¸ !°\'" n#
$6%
(&\'(d)*+T,
-.
/€01t3Р8;!¾<¾=
ä>
ì');
        $this->assertEqual($entry->getText(), '758 bytes unknown MakerNote data');
        $entry = $ifd0_0->getEntry(37510);
        // UserComment
        $this->assertIsA($entry, 'PelEntryUserComment');
        $this->assertEqual($entry->getValue(), '                                                                                                                     ');
        $this->assertEqual($entry->getText(), '                                                                                                                     ');
        $entry = $ifd0_0->getEntry(40960);
        // FlashPixVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'FlashPix Version 1.0');
        $entry = $ifd0_0->getEntry(40961);
        // ColorSpace
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'sRGB');
        $entry = $ifd0_0->getEntry(40962);
        // PixelXDimension
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2560);
        $this->assertEqual($entry->getText(), '2560');
        $entry = $ifd0_0->getEntry(40963);
        // PixelYDimension
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1920);
        $this->assertEqual($entry->getText(), '1920');
        $entry = $ifd0_0->getEntry(41728);
        // FileSource
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'DSC');
        $entry = $ifd0_0->getEntry(41985);
        // CustomRendered
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal process');
        $entry = $ifd0_0->getEntry(41986);
        // ExposureMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Auto exposure');
        $entry = $ifd0_0->getEntry(41987);
        // WhiteBalance
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Auto white balance');
        $entry = $ifd0_0->getEntry(41988);
        // DigitalZoomRatio
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 100, 1 => 100));
        $this->assertEqual($entry->getText(), '100/100');
        $entry = $ifd0_0->getEntry(41990);
        // SceneCaptureType
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Portrait');
        $entry = $ifd0_0->getEntry(41991);
        // GainControl
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41992);
        // Contrast
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41993);
        // Saturation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41994);
        // Sharpness
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        /* Sub IFDs of $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getSubIfds()), 1);
        $ifd0_0_0 = $ifd0_0->getSubIfd(4);
        // IFD Interoperability
        $this->assertIsA($ifd0_0_0, 'PelIfd');
        /* Start of IDF $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getEntries()), 2);
        $entry = $ifd0_0_0->getEntry(1);
        // InteroperabilityIndex
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'R98');
        $this->assertEqual($entry->getText(), 'R98');
        $entry = $ifd0_0_0->getEntry(2);
        // InteroperabilityVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'Interoperability Version 1.0');
        /* Sub IFDs of $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getSubIfds()), 0);
        $this->assertEqual($ifd0_0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_0_1 = $ifd0_0_0->getNextIfd();
        $this->assertNull($ifd0_0_1);
        /* End of IFD $ifd0_0_0. */
        $this->assertEqual($ifd0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_1 = $ifd0_0->getNextIfd();
        $this->assertNull($ifd0_1);
        /* End of IFD $ifd0_0. */
        $this->assertEqual($ifd0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd1 = $ifd0->getNextIfd();
        $this->assertIsA($ifd1, 'PelIfd');
        /* End of IFD $ifd0. */
        /* Start of IDF $ifd1. */
        $this->assertEqual(count($ifd1->getEntries()), 4);
        $entry = $ifd1->getEntry(259);
        // Compression
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 6);
        $this->assertEqual($entry->getText(), 'JPEG compression');
        $entry = $ifd1->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        /* Sub IFDs of $ifd1. */
        $this->assertEqual(count($ifd1->getSubIfds()), 0);
        $thumb_data = file_get_contents(dirname(__FILE__) . '/olympus-c50z-thumb.jpg');
        $this->assertEqual($ifd1->getThumbnailData(), $thumb_data);
        /* Next IFD. */
        $ifd2 = $ifd1->getNextIfd();
        $this->assertNull($ifd2);
        /* End of IFD $ifd1. */
Esempio n. 6
0
    function testRead()
    {
        Pel::clearExceptions();
        Pel::setStrictParsing(false);
        $jpeg = new PelJpeg(dirname(__FILE__) . '/sony-dsc-v1.jpg');
        $exif = $jpeg->getExif();
        $this->assertIsA($exif, 'PelExif');
        $tiff = $exif->getTiff();
        $this->assertIsA($tiff, 'PelTiff');
        /* The first IFD. */
        $ifd0 = $tiff->getIfd();
        $this->assertIsA($ifd0, 'PelIfd');
        /* Start of IDF $ifd0. */
        $this->assertEqual(count($ifd0->getEntries()), 10);
        $entry = $ifd0->getEntry(270);
        // ImageDescription
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), '                               ');
        $this->assertEqual($entry->getText(), '                               ');
        $entry = $ifd0->getEntry(271);
        // Make
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'SONY');
        $this->assertEqual($entry->getText(), 'SONY');
        $entry = $ifd0->getEntry(272);
        // Model
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'DSC-V1');
        $this->assertEqual($entry->getText(), 'DSC-V1');
        $entry = $ifd0->getEntry(274);
        // Orientation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 6);
        $this->assertEqual($entry->getText(), 'right - top');
        $entry = $ifd0->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd0->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd0->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        $entry = $ifd0->getEntry(306);
        // DateTime
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1089482993);
        $this->assertEqual($entry->getText(), '2004:07:10 18:09:53');
        $entry = $ifd0->getEntry(531);
        // YCbCrPositioning
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'co-sited');
        $entry = $ifd0->getEntry(50341);
        // PrintIM
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), 'PrintIM' . "" . '0250' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '');
        $this->assertEqual($entry->getText(), '(undefined)');
        /* Sub IFDs of $ifd0. */
        $this->assertEqual(count($ifd0->getSubIfds()), 1);
        $ifd0_0 = $ifd0->getSubIfd(2);
        // IFD Exif
        $this->assertIsA($ifd0_0, 'PelIfd');
        /* Start of IDF $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getEntries()), 26);
        $entry = $ifd0_0->getEntry(33434);
        // ExposureTime
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 10, 1 => 600));
        $this->assertEqual($entry->getText(), '1/60 sec.');
        $entry = $ifd0_0->getEntry(33437);
        // FNumber
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 32, 1 => 10));
        $this->assertEqual($entry->getText(), 'f/3.2');
        $entry = $ifd0_0->getEntry(34850);
        // ExposureProgram
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Normal program');
        $entry = $ifd0_0->getEntry(34855);
        // ISOSpeedRatings
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 100);
        $this->assertEqual($entry->getText(), '100');
        $entry = $ifd0_0->getEntry(36864);
        // ExifVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 2.2);
        $this->assertEqual($entry->getText(), 'Exif Version 2.2');
        $entry = $ifd0_0->getEntry(36867);
        // DateTimeOriginal
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1089482993);
        $this->assertEqual($entry->getText(), '2004:07:10 18:09:53');
        $entry = $ifd0_0->getEntry(36868);
        // DateTimeDigitized
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1089482993);
        $this->assertEqual($entry->getText(), '2004:07:10 18:09:53');
        $entry = $ifd0_0->getEntry(37121);
        // ComponentsConfiguration
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '' . "" . '');
        $this->assertEqual($entry->getText(), 'Y Cb Cr -');
        $entry = $ifd0_0->getEntry(37122);
        // CompressedBitsPerPixel
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 2, 1 => 1));
        $this->assertEqual($entry->getText(), '2/1');
        $entry = $ifd0_0->getEntry(37380);
        // ExposureBiasValue
        $this->assertIsA($entry, 'PelEntrySRational');
        $this->assertEqual($entry->getValue(), array(0 => 7, 1 => 10));
        $this->assertEqual($entry->getText(), '+0.7');
        $entry = $ifd0_0->getEntry(37381);
        // MaxApertureValue
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 48, 1 => 16));
        $this->assertEqual($entry->getText(), '48/16');
        $entry = $ifd0_0->getEntry(37383);
        // MeteringMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Center-Weighted Average');
        $entry = $ifd0_0->getEntry(37384);
        // LightSource
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Unknown');
        $entry = $ifd0_0->getEntry(37385);
        // Flash
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 31);
        $this->assertEqual($entry->getText(), 'Flash fired, auto mode, return light detected.');
        $entry = $ifd0_0->getEntry(37386);
        // FocalLength
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 139, 1 => 10));
        $this->assertEqual($entry->getText(), '13.9 mm');
        $entry = $ifd0_0->getEntry(37500);
        // MakerNote
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), 'SONY DSC ' . "" . '' . "" . '' . "" . '' . "" . '�' . "" . '�' . "" . '' . "" . '' . "" . '@' . "" . '' . "" . '�' . "" . '�' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '�' . "" . '�' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . 'd' . "" . '' . "" . '�' . "" . 'x' . "" . '' . "" . '' . "" . '~' . "" . '' . "" . '�' . "" . '�' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '�' . "" . '�' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '�' . "" . '�' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '������������������������������������������������' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'n~�' . "" . '�,' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '�A�' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '	�' . "" . '`�^��J�' . "" . '' . "" . '' . "" . '' . "" . 'J0' . "" . '�J0J�' . "" . 'p' . "" . '' . "" . 'p' . "" . '' . "" . '�' . "" . '^' . "" . '�' . "" . '' . "" . 'V
' . "" . '' . "" . '' . "" . 'c' . "" . '' . "" . '��' . "" . '' . "" . 'Ґ��' . "" . 'p' . "" . '' . "" . '�' . "" . '�^' . "" . '�o' . "" . '' . "" . '@P' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '�' . "" . '��' . "" . 't��' . "" . '�u=' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '�' . "" . '�tד�g��"0c' . "" . '' . "" . '' . "" . '' . "" . 'ק�!' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '�' . "" . '}' . "" . '(�' . "" . '^' . "" . '' . "" . '�' . "" . '����ד@' . "" . '' . "" . '' . "" . '��sF' . "" . '�' . "" . '�' . "" . '#' . "" . '#' . "" . 'G' . "" . '�' . "" . '' . "" . 'U�$1��ys�y�y��[��}����' . "" . '' . "" . 'i' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '�' . "" . '' . "" . 'G�' . "" . '' . "" . 'j' . "" . ' #' . "" . '^' . "" . '' . "" . '' . "" . 'V' . "" . '��' . "" . '' . "" . '��E�8T' . "" . 'i$�c���#(G�E�!�IX/' . "" . '�F�YZ��' . "" . '�R�nQ������������������������������������������������������� ' . "" . '�ܼ_' . "" . '' . "" . '��Q' . "" . '�' . "" . '�' . "" . '�' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '}' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '{' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '�Q' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '��' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '��' . "" . '' . "" . '��' . "" . '' . "" . '͕Q' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '}' . "" . '@' . "" . '' . "" . '' . "" . '' . "" . '�+�G^���� ����^+Vi��ت�`j�SV�V���] ��X^�����W},�$]�^��؏�O}n0(�K}���}	�&}Ĉ$��@�}�}�^F@�pD��' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '}' . "" . '^' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '@' . "" . '' . "" . '' . "" . '�' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '@' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '}' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '}' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '@C��^����0� 9Eζ1��0$0w0��e' . "" . '�}���C�il���E(�� ܾ[�>��l5' . "" . '' . "" . '' . "" . '' . "" . 'J"�@�^K����A^�V݊Ci�i[p��' . "" . '����}WV�i���i�V����i#i�����' . "" . '' . "" . '' . "" . '' . "" . '@C}@}T�T��p�^��V��p�p��V
' . "" . '�0c�ؾ[���!ז׆�"�!׶���t��׳ק' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '');
        $this->assertEqual($entry->getText(), '1504 bytes unknown MakerNote data');
        $entry = $ifd0_0->getEntry(40960);
        // FlashPixVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'FlashPix Version 1.0');
        $entry = $ifd0_0->getEntry(40961);
        // ColorSpace
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'sRGB');
        $entry = $ifd0_0->getEntry(40962);
        // PixelXDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 640);
        $this->assertEqual($entry->getText(), '640');
        $entry = $ifd0_0->getEntry(40963);
        // PixelYDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 480);
        $this->assertEqual($entry->getText(), '480');
        $entry = $ifd0_0->getEntry(41728);
        // FileSource
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'DSC');
        $entry = $ifd0_0->getEntry(41729);
        // SceneType
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'Directly photographed');
        $entry = $ifd0_0->getEntry(41985);
        // CustomRendered
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal process');
        $entry = $ifd0_0->getEntry(41986);
        // ExposureMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'Manual exposure');
        $entry = $ifd0_0->getEntry(41987);
        // WhiteBalance
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Auto white balance');
        $entry = $ifd0_0->getEntry(41990);
        // SceneCaptureType
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Standard');
        /* Sub IFDs of $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getSubIfds()), 1);
        $ifd0_0_0 = $ifd0_0->getSubIfd(4);
        // IFD Interoperability
        $this->assertIsA($ifd0_0_0, 'PelIfd');
        /* Start of IDF $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getEntries()), 2);
        $entry = $ifd0_0_0->getEntry(1);
        // InteroperabilityIndex
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'R98');
        $this->assertEqual($entry->getText(), 'R98');
        $entry = $ifd0_0_0->getEntry(2);
        // InteroperabilityVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'Interoperability Version 1.0');
        /* Sub IFDs of $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getSubIfds()), 0);
        $this->assertEqual($ifd0_0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_0_1 = $ifd0_0_0->getNextIfd();
        $this->assertNull($ifd0_0_1);
        /* End of IFD $ifd0_0_0. */
        $this->assertEqual($ifd0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_1 = $ifd0_0->getNextIfd();
        $this->assertNull($ifd0_1);
        /* End of IFD $ifd0_0. */
        $this->assertEqual($ifd0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd1 = $ifd0->getNextIfd();
        $this->assertIsA($ifd1, 'PelIfd');
        /* End of IFD $ifd0. */
        /* Start of IDF $ifd1. */
        $this->assertEqual(count($ifd1->getEntries()), 8);
        $entry = $ifd1->getEntry(259);
        // Compression
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 6);
        $this->assertEqual($entry->getText(), 'JPEG compression');
        $entry = $ifd1->getEntry(271);
        // Make
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'SONY');
        $this->assertEqual($entry->getText(), 'SONY');
        $entry = $ifd1->getEntry(272);
        // Model
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'DSC-V1');
        $this->assertEqual($entry->getText(), 'DSC-V1');
        $entry = $ifd1->getEntry(274);
        // Orientation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 6);
        $this->assertEqual($entry->getText(), 'right - top');
        $entry = $ifd1->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        $entry = $ifd1->getEntry(306);
        // DateTime
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1089482993);
        $this->assertEqual($entry->getText(), '2004:07:10 18:09:53');
        /* Sub IFDs of $ifd1. */
        $this->assertEqual(count($ifd1->getSubIfds()), 0);
        $thumb_data = file_get_contents(dirname(__FILE__) . '/sony-dsc-v1-thumb.jpg');
        $this->assertEqual($ifd1->getThumbnailData(), $thumb_data);
        /* Next IFD. */
        $ifd2 = $ifd1->getNextIfd();
        $this->assertNull($ifd2);
        /* End of IFD $ifd1. */
Esempio n. 7
0
 function testRead()
 {
     Pel::clearExceptions();
     Pel::setStrictParsing(false);
     $jpeg = new PelJpeg(dirname(__FILE__) . '/nikon-coolscan-iv.jpg');
     $exif = $jpeg->getExif();
     $this->assertIsA($exif, 'PelExif');
     $tiff = $exif->getTiff();
     $this->assertIsA($tiff, 'PelTiff');
     /* The first IFD. */
     $ifd0 = $tiff->getIfd();
     $this->assertIsA($ifd0, 'PelIfd');
     /* Start of IDF $ifd0. */
     $this->assertEqual(count($ifd0->getEntries()), 6);
     $entry = $ifd0->getEntry(271);
     // Make
     $this->assertIsA($entry, 'PelEntryAscii');
     $this->assertEqual($entry->getValue(), 'Nikon');
     $this->assertEqual($entry->getText(), 'Nikon');
     $entry = $ifd0->getEntry(282);
     // XResolution
     $this->assertIsA($entry, 'PelEntryRational');
     $this->assertEqual($entry->getValue(), array(0 => 2000, 1 => 1));
     $this->assertEqual($entry->getText(), '2000/1');
     $entry = $ifd0->getEntry(283);
     // YResolution
     $this->assertIsA($entry, 'PelEntryRational');
     $this->assertEqual($entry->getValue(), array(0 => 2000, 1 => 1));
     $this->assertEqual($entry->getText(), '2000/1');
     $entry = $ifd0->getEntry(296);
     // ResolutionUnit
     $this->assertIsA($entry, 'PelEntryShort');
     $this->assertEqual($entry->getValue(), 2);
     $this->assertEqual($entry->getText(), 'Inch');
     $entry = $ifd0->getEntry(306);
     // DateTime
     $this->assertIsA($entry, 'PelEntryTime');
     $this->assertEqual($entry->getValue(), 1090023875);
     $this->assertEqual($entry->getText(), '2004:07:17 00:24:35');
     $entry = $ifd0->getEntry(531);
     // YCbCrPositioning
     $this->assertIsA($entry, 'PelEntryShort');
     $this->assertEqual($entry->getValue(), 1);
     $this->assertEqual($entry->getText(), 'centered');
     /* Sub IFDs of $ifd0. */
     $this->assertEqual(count($ifd0->getSubIfds()), 2);
     $ifd0_0 = $ifd0->getSubIfd(2);
     // IFD Exif
     $this->assertIsA($ifd0_0, 'PelIfd');
     /* Start of IDF $ifd0_0. */
     $this->assertEqual(count($ifd0_0->getEntries()), 7);
     $entry = $ifd0_0->getEntry(36864);
     // ExifVersion
     $this->assertIsA($entry, 'PelEntryVersion');
     $this->assertEqual($entry->getValue(), 2.1);
     $this->assertEqual($entry->getText(), 'Exif Version 2.1');
     $entry = $ifd0_0->getEntry(37121);
     // ComponentsConfiguration
     $this->assertIsA($entry, 'PelEntryUndefined');
     $this->assertEqual($entry->getValue(), '' . "" . '');
     $this->assertEqual($entry->getText(), 'Y Cb Cr -');
     $entry = $ifd0_0->getEntry(37500);
     // MakerNote
     $this->assertIsA($entry, 'PelEntryUndefined');
     $this->assertEqual($entry->getValue(), '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '0100' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '');
     $this->assertEqual($entry->getText(), '32 bytes unknown MakerNote data');
     $entry = $ifd0_0->getEntry(40960);
     // FlashPixVersion
     $this->assertIsA($entry, 'PelEntryVersion');
     $this->assertEqual($entry->getValue(), 1);
     $this->assertEqual($entry->getText(), 'FlashPix Version 1.0');
     $entry = $ifd0_0->getEntry(40961);
     // ColorSpace
     $this->assertIsA($entry, 'PelEntryShort');
     $this->assertEqual($entry->getValue(), 1);
     $this->assertEqual($entry->getText(), 'sRGB');
     $entry = $ifd0_0->getEntry(40962);
     // PixelXDimension
     $this->assertIsA($entry, 'PelEntryLong');
     $this->assertEqual($entry->getValue(), 960);
     $this->assertEqual($entry->getText(), '960');
     $entry = $ifd0_0->getEntry(40963);
     // PixelYDimension
     $this->assertIsA($entry, 'PelEntryLong');
     $this->assertEqual($entry->getValue(), 755);
     $this->assertEqual($entry->getText(), '755');
     /* Sub IFDs of $ifd0_0. */
     $this->assertEqual(count($ifd0_0->getSubIfds()), 0);
     $this->assertEqual($ifd0_0->getThumbnailData(), '');
     /* Next IFD. */
     $ifd0_1 = $ifd0_0->getNextIfd();
     $this->assertNull($ifd0_1);
     /* End of IFD $ifd0_0. */
     $ifd0_1 = $ifd0->getSubIfd(3);
     // IFD GPS
     $this->assertIsA($ifd0_1, 'PelIfd');
     /* Start of IDF $ifd0_1. */
     $this->assertEqual(count($ifd0_1->getEntries()), 0);
     /* Sub IFDs of $ifd0_1. */
     $this->assertEqual(count($ifd0_1->getSubIfds()), 0);
     $this->assertEqual($ifd0_1->getThumbnailData(), '');
     /* Next IFD. */
     $ifd0_2 = $ifd0_1->getNextIfd();
     $this->assertNull($ifd0_2);
     /* End of IFD $ifd0_1. */
     $this->assertEqual($ifd0->getThumbnailData(), '');
     /* Next IFD. */
     $ifd1 = $ifd0->getNextIfd();
     $this->assertNull($ifd1);
     /* End of IFD $ifd0. */
     $this->assertTrue(count(Pel::getExceptions()) == 0);
 }
    function testRead()
    {
        Pel::clearExceptions();
        Pel::setStrictParsing(false);
        $jpeg = new PelJpeg(dirname(__FILE__) . '/canon-powershot-s60.jpg');
        $exif = $jpeg->getExif();
        $this->assertIsA($exif, 'PelExif');
        $tiff = $exif->getTiff();
        $this->assertIsA($tiff, 'PelTiff');
        /* The first IFD. */
        $ifd0 = $tiff->getIfd();
        $this->assertIsA($ifd0, 'PelIfd');
        /* Start of IDF $ifd0. */
        $this->assertEqual(count($ifd0->getEntries()), 8);
        $entry = $ifd0->getEntry(271);
        // Make
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'Canon');
        $this->assertEqual($entry->getText(), 'Canon');
        $entry = $ifd0->getEntry(272);
        // Model
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'Canon PowerShot S60');
        $this->assertEqual($entry->getText(), 'Canon PowerShot S60');
        $entry = $ifd0->getEntry(274);
        // Orientation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'top - left');
        $entry = $ifd0->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 180, 1 => 1));
        $this->assertEqual($entry->getText(), '180/1');
        $entry = $ifd0->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 180, 1 => 1));
        $this->assertEqual($entry->getText(), '180/1');
        $entry = $ifd0->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        $entry = $ifd0->getEntry(306);
        // DateTime
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1097316018);
        $this->assertEqual($entry->getText(), '2004:10:09 10:00:18');
        $entry = $ifd0->getEntry(531);
        // YCbCrPositioning
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'centered');
        /* Sub IFDs of $ifd0. */
        $this->assertEqual(count($ifd0->getSubIfds()), 1);
        $ifd0_0 = $ifd0->getSubIfd(2);
        // IFD Exif
        $this->assertIsA($ifd0_0, 'PelIfd');
        /* Start of IDF $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getEntries()), 30);
        $entry = $ifd0_0->getEntry(33434);
        // ExposureTime
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 1, 1 => 8));
        $this->assertEqual($entry->getText(), '1/8 sec.');
        $entry = $ifd0_0->getEntry(33437);
        // FNumber
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 53, 1 => 10));
        $this->assertEqual($entry->getText(), 'f/5.3');
        $entry = $ifd0_0->getEntry(36864);
        // ExifVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 2.2);
        $this->assertEqual($entry->getText(), 'Exif Version 2.2');
        $entry = $ifd0_0->getEntry(36867);
        // DateTimeOriginal
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1097316018);
        $this->assertEqual($entry->getText(), '2004:10:09 10:00:18');
        $entry = $ifd0_0->getEntry(36868);
        // DateTimeDigitized
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1097316018);
        $this->assertEqual($entry->getText(), '2004:10:09 10:00:18');
        $entry = $ifd0_0->getEntry(37121);
        // ComponentsConfiguration
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'Y Cb Cr -');
        $entry = $ifd0_0->getEntry(37122);
        // CompressedBitsPerPixel
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 2, 1 => 1));
        $this->assertEqual($entry->getText(), '2/1');
        $entry = $ifd0_0->getEntry(37377);
        // ShutterSpeedValue
        $this->assertIsA($entry, 'PelEntrySRational');
        $this->assertEqual($entry->getValue(), array(0 => 96, 1 => 32));
        $this->assertEqual($entry->getText(), '96/32 sec. (APEX: 2)');
        $entry = $ifd0_0->getEntry(37378);
        // ApertureValue
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 154, 1 => 32));
        $this->assertEqual($entry->getText(), 'f/5.3');
        $entry = $ifd0_0->getEntry(37380);
        // ExposureBiasValue
        $this->assertIsA($entry, 'PelEntrySRational');
        $this->assertEqual($entry->getValue(), array(0 => 0, 1 => 3));
        $this->assertEqual($entry->getText(), '0.0');
        $entry = $ifd0_0->getEntry(37381);
        // MaxApertureValue
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 154, 1 => 32));
        $this->assertEqual($entry->getText(), '154/32');
        $entry = $ifd0_0->getEntry(37383);
        // MeteringMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 5);
        $this->assertEqual($entry->getText(), 'Pattern');
        $entry = $ifd0_0->getEntry(37385);
        // Flash
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 16);
        $this->assertEqual($entry->getText(), 'Flash did not fire, compulsory flash mode.');
        $entry = $ifd0_0->getEntry(37386);
        // FocalLength
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 662, 1 => 32));
        $this->assertEqual($entry->getText(), '20.7 mm');
        $entry = $ifd0_0->getEntry(37500);
        // MakerNote
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '.���"�0<D| ��iB	 �9��
$�\\@����� ������5 
 
���"�D �6�`j�`�		�� 
��\',��,��,��������*** IMG:PowerShot S60 JPEGFirmware Version 1.00Q
��H	||}z�|�zDX�
��
t�%�*��II*�');
        $this->assertEqual($entry->getText(), '904 bytes unknown MakerNote data');
        $entry = $ifd0_0->getEntry(37510);
        // UserComment
        $this->assertIsA($entry, 'PelEntryUserComment');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), '');
        $entry = $ifd0_0->getEntry(40960);
        // FlashPixVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'FlashPix Version 1.0');
        $entry = $ifd0_0->getEntry(40961);
        // ColorSpace
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'sRGB');
        $entry = $ifd0_0->getEntry(40962);
        // PixelXDimension
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 640);
        $this->assertEqual($entry->getText(), '640');
        $entry = $ifd0_0->getEntry(40963);
        // PixelYDimension
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 480);
        $this->assertEqual($entry->getText(), '480');
        $entry = $ifd0_0->getEntry(41486);
        // FocalPlaneXResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 640000, 1 => 283));
        $this->assertEqual($entry->getText(), '640000/283');
        $entry = $ifd0_0->getEntry(41487);
        // FocalPlaneYResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 480000, 1 => 212));
        $this->assertEqual($entry->getText(), '480000/212');
        $entry = $ifd0_0->getEntry(41488);
        // FocalPlaneResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        $entry = $ifd0_0->getEntry(41495);
        // SensingMethod
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'One-chip color area sensor');
        $entry = $ifd0_0->getEntry(41728);
        // FileSource
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'DSC');
        $entry = $ifd0_0->getEntry(41985);
        // CustomRendered
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal process');
        $entry = $ifd0_0->getEntry(41986);
        // ExposureMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Auto exposure');
        $entry = $ifd0_0->getEntry(41987);
        // WhiteBalance
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Auto white balance');
        $entry = $ifd0_0->getEntry(41988);
        // DigitalZoomRatio
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 2592, 1 => 2592));
        $this->assertEqual($entry->getText(), '2592/2592');
        $entry = $ifd0_0->getEntry(41990);
        // SceneCaptureType
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Standard');
        /* Sub IFDs of $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getSubIfds()), 1);
        $ifd0_0_0 = $ifd0_0->getSubIfd(4);
        // IFD Interoperability
        $this->assertIsA($ifd0_0_0, 'PelIfd');
        /* Start of IDF $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getEntries()), 4);
        $entry = $ifd0_0_0->getEntry(1);
        // InteroperabilityIndex
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'R98');
        $this->assertEqual($entry->getText(), 'R98');
        $entry = $ifd0_0_0->getEntry(2);
        // InteroperabilityVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'Interoperability Version 1.0');
        $entry = $ifd0_0_0->getEntry(4097);
        // RelatedImageWidth
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 640);
        $this->assertEqual($entry->getText(), '640');
        $entry = $ifd0_0_0->getEntry(4098);
        // RelatedImageLength
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 480);
        $this->assertEqual($entry->getText(), '480');
        /* Sub IFDs of $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getSubIfds()), 0);
        $this->assertEqual($ifd0_0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_0_1 = $ifd0_0_0->getNextIfd();
        $this->assertNull($ifd0_0_1);
        /* End of IFD $ifd0_0_0. */
        $this->assertEqual($ifd0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_1 = $ifd0_0->getNextIfd();
        $this->assertNull($ifd0_1);
        /* End of IFD $ifd0_0. */
        $this->assertEqual($ifd0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd1 = $ifd0->getNextIfd();
        $this->assertIsA($ifd1, 'PelIfd');
        /* End of IFD $ifd0. */
        /* Start of IDF $ifd1. */
        $this->assertEqual(count($ifd1->getEntries()), 4);
        $entry = $ifd1->getEntry(259);
        // Compression
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 6);
        $this->assertEqual($entry->getText(), 'JPEG compression');
        $entry = $ifd1->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 180, 1 => 1));
        $this->assertEqual($entry->getText(), '180/1');
        $entry = $ifd1->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 180, 1 => 1));
        $this->assertEqual($entry->getText(), '180/1');
        $entry = $ifd1->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        /* Sub IFDs of $ifd1. */
        $this->assertEqual(count($ifd1->getSubIfds()), 0);
        $thumb_data = file_get_contents(dirname(__FILE__) . '/canon-powershot-s60-thumb.jpg');
        $this->assertEqual($ifd1->getThumbnailData(), $thumb_data);
        /* Next IFD. */
        $ifd2 = $ifd1->getNextIfd();
        $this->assertNull($ifd2);
        /* End of IFD $ifd1. */
        $this->assertTrue(count(Pel::getExceptions()) == 0);
    function testRead()
    {
        Pel::clearExceptions();
        Pel::setStrictParsing(false);
        $jpeg = new PelJpeg(dirname(__FILE__) . '/nikon-e5000.jpg');
        $exif = $jpeg->getExif();
        $this->assertIsA($exif, 'PelExif');
        $tiff = $exif->getTiff();
        $this->assertIsA($tiff, 'PelTiff');
        /* The first IFD. */
        $ifd0 = $tiff->getIfd();
        $this->assertIsA($ifd0, 'PelIfd');
        /* Start of IDF $ifd0. */
        $this->assertEqual(count($ifd0->getEntries()), 9);
        $entry = $ifd0->getEntry(270);
        // ImageDescription
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), '          ');
        $this->assertEqual($entry->getText(), '          ');
        $entry = $ifd0->getEntry(271);
        // Make
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'NIKON');
        $this->assertEqual($entry->getText(), 'NIKON');
        $entry = $ifd0->getEntry(272);
        // Model
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'E5000');
        $this->assertEqual($entry->getText(), 'E5000');
        $entry = $ifd0->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 300, 1 => 1));
        $this->assertEqual($entry->getText(), '300/1');
        $entry = $ifd0->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 300, 1 => 1));
        $this->assertEqual($entry->getText(), '300/1');
        $entry = $ifd0->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        $entry = $ifd0->getEntry(305);
        // Software
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'E5000v1.6');
        $this->assertEqual($entry->getText(), 'E5000v1.6');
        $entry = $ifd0->getEntry(306);
        // DateTime
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1021992832);
        $this->assertEqual($entry->getText(), '2002:05:21 14:53:52');
        $entry = $ifd0->getEntry(531);
        // YCbCrPositioning
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'centered');
        /* Sub IFDs of $ifd0. */
        $this->assertEqual(count($ifd0->getSubIfds()), 2);
        $ifd0_0 = $ifd0->getSubIfd(2);
        // IFD Exif
        $this->assertIsA($ifd0_0, 'PelIfd');
        /* Start of IDF $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getEntries()), 22);
        $entry = $ifd0_0->getEntry(33434);
        // ExposureTime
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 1642036, 1 => 100000000));
        $this->assertEqual($entry->getText(), '1/60 sec.');
        $entry = $ifd0_0->getEntry(33437);
        // FNumber
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 28, 1 => 10));
        $this->assertEqual($entry->getText(), 'f/2.8');
        $entry = $ifd0_0->getEntry(34850);
        // ExposureProgram
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Normal program');
        $entry = $ifd0_0->getEntry(34855);
        // ISOSpeedRatings
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 100);
        $this->assertEqual($entry->getText(), '100');
        $entry = $ifd0_0->getEntry(36864);
        // ExifVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 2.1);
        $this->assertEqual($entry->getText(), 'Exif Version 2.1');
        $entry = $ifd0_0->getEntry(36867);
        // DateTimeOriginal
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1021992832);
        $this->assertEqual($entry->getText(), '2002:05:21 14:53:52');
        $entry = $ifd0_0->getEntry(36868);
        // DateTimeDigitized
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1021992832);
        $this->assertEqual($entry->getText(), '2002:05:21 14:53:52');
        $entry = $ifd0_0->getEntry(37121);
        // ComponentsConfiguration
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'Y Cb Cr -');
        $entry = $ifd0_0->getEntry(37380);
        // ExposureBiasValue
        $this->assertIsA($entry, 'PelEntrySRational');
        $this->assertEqual($entry->getValue(), array(0 => 0, 1 => 10));
        $this->assertEqual($entry->getText(), '0.0');
        $entry = $ifd0_0->getEntry(37381);
        // MaxApertureValue
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 3, 1 => 1));
        $this->assertEqual($entry->getText(), '3/1');
        $entry = $ifd0_0->getEntry(37383);
        // MeteringMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 5);
        $this->assertEqual($entry->getText(), 'Pattern');
        $entry = $ifd0_0->getEntry(37384);
        // LightSource
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Unknown');
        $entry = $ifd0_0->getEntry(37385);
        // Flash
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Flash did not fire.');
        $entry = $ifd0_0->getEntry(37386);
        // FocalLength
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 71, 1 => 10));
        $this->assertEqual($entry->getText(), '7.1 mm');
        $entry = $ifd0_0->getEntry(37500);
        // MakerNote
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '��
���
�
����
�"�*��2��D�JrCOLORFINE   AUTO        1AUTO  AF-C  :NORMAL      �"�AUTO  AUTO         OFF                           OFF  PrintIM0100
^	
�
�	\'\'�\'�\'\'^\'�\'�\'�\'');
        $this->assertEqual($entry->getText(), '604 bytes unknown MakerNote data');
        $entry = $ifd0_0->getEntry(37510);
        // UserComment
        $this->assertIsA($entry, 'PelEntryUserComment');
        $this->assertEqual($entry->getValue(), '                                                                                                                     ');
        $this->assertEqual($entry->getText(), '                                                                                                                     ');
        $entry = $ifd0_0->getEntry(40960);
        // FlashPixVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'FlashPix Version 1.0');
        $entry = $ifd0_0->getEntry(40961);
        // ColorSpace
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'sRGB');
        $entry = $ifd0_0->getEntry(40962);
        // PixelXDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 1600);
        $this->assertEqual($entry->getText(), '1600');
        $entry = $ifd0_0->getEntry(40963);
        // PixelYDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 1200);
        $this->assertEqual($entry->getText(), '1200');
        $entry = $ifd0_0->getEntry(41728);
        // FileSource
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'DSC');
        $entry = $ifd0_0->getEntry(41729);
        // SceneType
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'Directly photographed');
        /* Sub IFDs of $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getSubIfds()), 0);
        $this->assertEqual($ifd0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_1 = $ifd0_0->getNextIfd();
        $this->assertNull($ifd0_1);
        /* End of IFD $ifd0_0. */
        $ifd0_1 = $ifd0->getSubIfd(3);
        // IFD GPS
        $this->assertIsA($ifd0_1, 'PelIfd');
        /* Start of IDF $ifd0_1. */
        $this->assertEqual(count($ifd0_1->getEntries()), 0);
        /* Sub IFDs of $ifd0_1. */
        $this->assertEqual(count($ifd0_1->getSubIfds()), 0);
        $this->assertEqual($ifd0_1->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_2 = $ifd0_1->getNextIfd();
        $this->assertNull($ifd0_2);
        /* End of IFD $ifd0_1. */
        $this->assertEqual($ifd0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd1 = $ifd0->getNextIfd();
        $this->assertIsA($ifd1, 'PelIfd');
        /* End of IFD $ifd0. */
        /* Start of IDF $ifd1. */
        $this->assertEqual(count($ifd1->getEntries()), 4);
        $entry = $ifd1->getEntry(259);
        // Compression
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 6);
        $this->assertEqual($entry->getText(), 'JPEG compression');
        $entry = $ifd1->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        /* Sub IFDs of $ifd1. */
        $this->assertEqual(count($ifd1->getSubIfds()), 0);
        $thumb_data = file_get_contents(dirname(__FILE__) . '/nikon-e5000-thumb.jpg');
        $this->assertEqual($ifd1->getThumbnailData(), $thumb_data);
        /* Next IFD. */
        $ifd2 = $ifd1->getNextIfd();
        $this->assertNull($ifd2);
Esempio n. 10
0
    function testRead()
    {
        Pel::clearExceptions();
        Pel::setStrictParsing(false);
        $jpeg = new PelJpeg(dirname(__FILE__) . '/leica-d-lux.jpg');
        $exif = $jpeg->getExif();
        $this->assertIsA($exif, 'PelExif');
        $tiff = $exif->getTiff();
        $this->assertIsA($tiff, 'PelTiff');
        /* The first IFD. */
        $ifd0 = $tiff->getIfd();
        $this->assertIsA($ifd0, 'PelIfd');
        /* Start of IDF $ifd0. */
        $this->assertEqual(count($ifd0->getEntries()), 10);
        $entry = $ifd0->getEntry(271);
        // Make
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'LEICA');
        $this->assertEqual($entry->getText(), 'LEICA');
        $entry = $ifd0->getEntry(272);
        // Model
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'D-LUX');
        $this->assertEqual($entry->getText(), 'D-LUX');
        $entry = $ifd0->getEntry(274);
        // Orientation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'top - left');
        $entry = $ifd0->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd0->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd0->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        $entry = $ifd0->getEntry(305);
        // Software
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'Ver1.06');
        $this->assertEqual($entry->getText(), 'Ver1.06');
        $entry = $ifd0->getEntry(306);
        // DateTime
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1099994128);
        $this->assertEqual($entry->getText(), '2004:11:09 09:55:28');
        $entry = $ifd0->getEntry(531);
        // YCbCrPositioning
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'co-sited');
        $entry = $ifd0->getEntry(50341);
        // PrintIM
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), 'PrintIM0250d	
¬
Ä€	\'\'7\'°\'\'^\'‹\'Ë\'å\'');
        $this->assertEqual($entry->getText(), '(undefined)');
        /* Sub IFDs of $ifd0. */
        $this->assertEqual(count($ifd0->getSubIfds()), 1);
        $ifd0_0 = $ifd0->getSubIfd(2);
        // IFD Exif
        $this->assertIsA($ifd0_0, 'PelIfd');
        /* Start of IDF $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getEntries()), 37);
        $entry = $ifd0_0->getEntry(33434);
        // ExposureTime
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 10, 1 => 1000));
        $this->assertEqual($entry->getText(), '1/100 sec.');
        $entry = $ifd0_0->getEntry(33437);
        // FNumber
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 97, 1 => 10));
        $this->assertEqual($entry->getText(), 'f/9.7');
        $entry = $ifd0_0->getEntry(34850);
        // ExposureProgram
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Normal program');
        $entry = $ifd0_0->getEntry(34855);
        // ISOSpeedRatings
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 100);
        $this->assertEqual($entry->getText(), '100');
        $entry = $ifd0_0->getEntry(36864);
        // ExifVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 2.2);
        $this->assertEqual($entry->getText(), 'Exif Version 2.2');
        $entry = $ifd0_0->getEntry(36867);
        // DateTimeOriginal
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1099994128);
        $this->assertEqual($entry->getText(), '2004:11:09 09:55:28');
        $entry = $ifd0_0->getEntry(36868);
        // DateTimeDigitized
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1099994128);
        $this->assertEqual($entry->getText(), '2004:11:09 09:55:28');
        $entry = $ifd0_0->getEntry(37121);
        // ComponentsConfiguration
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'Y Cb Cr -');
        $entry = $ifd0_0->getEntry(37122);
        // CompressedBitsPerPixel
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 21, 1 => 10));
        $this->assertEqual($entry->getText(), '21/10');
        $entry = $ifd0_0->getEntry(37377);
        // ShutterSpeedValue
        $this->assertIsA($entry, 'PelEntrySRational');
        $this->assertEqual($entry->getValue(), array(0 => 6644, 1 => 1000));
        $this->assertEqual($entry->getText(), '6644/1000 sec. (APEX: 10)');
        $entry = $ifd0_0->getEntry(37378);
        // ApertureValue
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 66, 1 => 10));
        $this->assertEqual($entry->getText(), 'f/9.8');
        $entry = $ifd0_0->getEntry(37380);
        // ExposureBiasValue
        $this->assertIsA($entry, 'PelEntrySRational');
        $this->assertEqual($entry->getValue(), array(0 => 0, 1 => 100));
        $this->assertEqual($entry->getText(), '0.0');
        $entry = $ifd0_0->getEntry(37381);
        // MaxApertureValue
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 30, 1 => 10));
        $this->assertEqual($entry->getText(), '30/10');
        $entry = $ifd0_0->getEntry(37383);
        // MeteringMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 3);
        $this->assertEqual($entry->getText(), 'Spot');
        $entry = $ifd0_0->getEntry(37384);
        // LightSource
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'Daylight');
        $entry = $ifd0_0->getEntry(37385);
        // Flash
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 24);
        $this->assertEqual($entry->getText(), 'Flash did not fire, auto mode.');
        $entry = $ifd0_0->getEntry(37386);
        // FocalLength
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 88, 1 => 10));
        $this->assertEqual($entry->getText(), '8.8 mm');
        $entry = $ifd0_0->getEntry(37500);
        // MakerNote
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), 'LEICA0100 !r^"WBb6¹’¨ŒÜ KœÕ;D«l¸AF–Ž ST$AE§L(	“Dà  
EP
');
        $this->assertEqual($entry->getText(), '256 bytes unknown MakerNote data');
        $entry = $ifd0_0->getEntry(40960);
        // FlashPixVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'FlashPix Version 1.0');
        $entry = $ifd0_0->getEntry(40961);
        // ColorSpace
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'sRGB');
        $entry = $ifd0_0->getEntry(40962);
        // PixelXDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 640);
        $this->assertEqual($entry->getText(), '640');
        $entry = $ifd0_0->getEntry(40963);
        // PixelYDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 480);
        $this->assertEqual($entry->getText(), '480');
        $entry = $ifd0_0->getEntry(41495);
        // SensingMethod
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'One-chip color area sensor');
        $entry = $ifd0_0->getEntry(41728);
        // FileSource
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'DSC');
        $entry = $ifd0_0->getEntry(41729);
        // SceneType
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'Directly photographed');
        $entry = $ifd0_0->getEntry(41730);
        // CFAPattern
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), '(undefined)');
        $entry = $ifd0_0->getEntry(41985);
        // CustomRendered
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal process');
        $entry = $ifd0_0->getEntry(41986);
        // ExposureMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Auto exposure');
        $entry = $ifd0_0->getEntry(41987);
        // WhiteBalance
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Auto white balance');
        $entry = $ifd0_0->getEntry(41988);
        // DigitalZoomRatio
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 0, 1 => 10));
        $this->assertEqual($entry->getText(), '0/10');
        $entry = $ifd0_0->getEntry(41989);
        // FocalLengthIn35mmFilm
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 53);
        $this->assertEqual($entry->getText(), '53');
        $entry = $ifd0_0->getEntry(41990);
        // SceneCaptureType
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Standard');
        $entry = $ifd0_0->getEntry(41991);
        // GainControl
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41992);
        // Contrast
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41993);
        // Saturation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41994);
        // Sharpness
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41996);
        // SubjectDistanceRange
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Close view');
        /* Sub IFDs of $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getSubIfds()), 1);
        $ifd0_0_0 = $ifd0_0->getSubIfd(4);
        // IFD Interoperability
        $this->assertIsA($ifd0_0_0, 'PelIfd');
        /* Start of IDF $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getEntries()), 2);
        $entry = $ifd0_0_0->getEntry(1);
        // InteroperabilityIndex
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'R98');
        $this->assertEqual($entry->getText(), 'R98');
        $entry = $ifd0_0_0->getEntry(2);
        // InteroperabilityVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'Interoperability Version 1.0');
        /* Sub IFDs of $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getSubIfds()), 0);
        $this->assertEqual($ifd0_0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_0_1 = $ifd0_0_0->getNextIfd();
        $this->assertNull($ifd0_0_1);
        /* End of IFD $ifd0_0_0. */
        $this->assertEqual($ifd0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_1 = $ifd0_0->getNextIfd();
        $this->assertNull($ifd0_1);
        /* End of IFD $ifd0_0. */
        $this->assertEqual($ifd0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd1 = $ifd0->getNextIfd();
        $this->assertIsA($ifd1, 'PelIfd');
        /* End of IFD $ifd0. */
        /* Start of IDF $ifd1. */
        $this->assertEqual(count($ifd1->getEntries()), 5);
        $entry = $ifd1->getEntry(259);
        // Compression
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 6);
        $this->assertEqual($entry->getText(), 'JPEG compression');
        $entry = $ifd1->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        $entry = $ifd1->getEntry(531);
        // YCbCrPositioning
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'co-sited');
        /* Sub IFDs of $ifd1. */
        $this->assertEqual(count($ifd1->getSubIfds()), 0);
        $thumb_data = file_get_contents(dirname(__FILE__) . '/leica-d-lux-thumb.jpg');
        $this->assertEqual($ifd1->getThumbnailData(), $thumb_data);
        /* Next IFD. */
        $ifd2 = $ifd1->getNextIfd();
        $this->assertNull($ifd2);
        /* End of IFD $ifd1. */
        $this->assertTrue(count(Pel::getExceptions()) == 0);
Esempio n. 11
0
    function testRead()
    {
        Pel::clearExceptions();
        Pel::setStrictParsing(false);
        $jpeg = new PelJpeg(dirname(__FILE__) . '/sony-dsc-v1.jpg');
        $exif = $jpeg->getExif();
        $this->assertIsA($exif, 'PelExif');
        $tiff = $exif->getTiff();
        $this->assertIsA($tiff, 'PelTiff');
        /* The first IFD. */
        $ifd0 = $tiff->getIfd();
        $this->assertIsA($ifd0, 'PelIfd');
        /* Start of IDF $ifd0. */
        $this->assertEqual(count($ifd0->getEntries()), 10);
        $entry = $ifd0->getEntry(270);
        // ImageDescription
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), '                               ');
        $this->assertEqual($entry->getText(), '                               ');
        $entry = $ifd0->getEntry(271);
        // Make
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'SONY');
        $this->assertEqual($entry->getText(), 'SONY');
        $entry = $ifd0->getEntry(272);
        // Model
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'DSC-V1');
        $this->assertEqual($entry->getText(), 'DSC-V1');
        $entry = $ifd0->getEntry(274);
        // Orientation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 6);
        $this->assertEqual($entry->getText(), 'right - top');
        $entry = $ifd0->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd0->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd0->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        $entry = $ifd0->getEntry(306);
        // DateTime
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1089482993);
        $this->assertEqual($entry->getText(), '2004:07:10 18:09:53');
        $entry = $ifd0->getEntry(531);
        // YCbCrPositioning
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'co-sited');
        $entry = $ifd0->getEntry(50341);
        // PrintIM
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), 'PrintIM0250');
        $this->assertEqual($entry->getText(), '(undefined)');
        /* Sub IFDs of $ifd0. */
        $this->assertEqual(count($ifd0->getSubIfds()), 1);
        $ifd0_0 = $ifd0->getSubIfd(2);
        // IFD Exif
        $this->assertIsA($ifd0_0, 'PelIfd');
        /* Start of IDF $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getEntries()), 26);
        $entry = $ifd0_0->getEntry(33434);
        // ExposureTime
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 10, 1 => 600));
        $this->assertEqual($entry->getText(), '1/60 sec.');
        $entry = $ifd0_0->getEntry(33437);
        // FNumber
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 32, 1 => 10));
        $this->assertEqual($entry->getText(), 'f/3.2');
        $entry = $ifd0_0->getEntry(34850);
        // ExposureProgram
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Normal program');
        $entry = $ifd0_0->getEntry(34855);
        // ISOSpeedRatings
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 100);
        $this->assertEqual($entry->getText(), '100');
        $entry = $ifd0_0->getEntry(36864);
        // ExifVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 2.2);
        $this->assertEqual($entry->getText(), 'Exif Version 2.2');
        $entry = $ifd0_0->getEntry(36867);
        // DateTimeOriginal
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1089482993);
        $this->assertEqual($entry->getText(), '2004:07:10 18:09:53');
        $entry = $ifd0_0->getEntry(36868);
        // DateTimeDigitized
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1089482993);
        $this->assertEqual($entry->getText(), '2004:07:10 18:09:53');
        $entry = $ifd0_0->getEntry(37121);
        // ComponentsConfiguration
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'Y Cb Cr -');
        $entry = $ifd0_0->getEntry(37122);
        // CompressedBitsPerPixel
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 2, 1 => 1));
        $this->assertEqual($entry->getText(), '2/1');
        $entry = $ifd0_0->getEntry(37380);
        // ExposureBiasValue
        $this->assertIsA($entry, 'PelEntrySRational');
        $this->assertEqual($entry->getValue(), array(0 => 7, 1 => 10));
        $this->assertEqual($entry->getText(), '+0.7');
        $entry = $ifd0_0->getEntry(37381);
        // MaxApertureValue
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 48, 1 => 16));
        $this->assertEqual($entry->getText(), '48/16');
        $entry = $ifd0_0->getEntry(37383);
        // MeteringMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Center-Weighted Average');
        $entry = $ifd0_0->getEntry(37384);
        // LightSource
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Unknown');
        $entry = $ifd0_0->getEntry(37385);
        // Flash
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 31);
        $this->assertEqual($entry->getText(), 'Flash fired, auto mode, return light detected.');
        $entry = $ifd0_0->getEntry(37386);
        // FocalLength
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 139, 1 => 10));
        $this->assertEqual($entry->getText(), '13.9 mm');
        $entry = $ifd0_0->getEntry(37500);
        // MakerNote
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), 'SONY DSC ��@�������d�x~���������������������������������������������������������n~��,��A�	�`�^��J�J0�J0J�pp�^�V
c��Ґ��p��^�o@P���t���u=����tד�g��"0cק�!�}(�^�����ד@��sF��##G�U�$1��ys�y�y��[��}����i��G�j #^V����E�8Ti$�c���#(G�E�!�IX/�F�YZ���R�nQ������������������������������������������������������� �ܼ_��Q����}{�Q�������͕Q}@�+�G^���� ����^+Vi��ت�`j�SV�V���] ��X^�����W},�$]�^��؏�O}n0(�K}���}	�&}Ĉ$��@�}�}�^F@�pD��}^@��@}�}�@C��^����0� 9Eζ1��0$0w0��e�}���C�il���E(�� ܾ[�>��l5J"�@�^K����A^�V݊Ci�i[p������}WV�i���i�V����i#i�����@C}@}T�T��p�^��V��p�p��V
�0c�ؾ[���!ז׆�"�!׶���t��׳ק');
        $this->assertEqual($entry->getText(), '1504 bytes unknown MakerNote data');
        $entry = $ifd0_0->getEntry(40960);
        // FlashPixVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'FlashPix Version 1.0');
        $entry = $ifd0_0->getEntry(40961);
        // ColorSpace
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'sRGB');
        $entry = $ifd0_0->getEntry(40962);
        // PixelXDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 640);
        $this->assertEqual($entry->getText(), '640');
        $entry = $ifd0_0->getEntry(40963);
        // PixelYDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 480);
        $this->assertEqual($entry->getText(), '480');
        $entry = $ifd0_0->getEntry(41728);
        // FileSource
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'DSC');
        $entry = $ifd0_0->getEntry(41729);
        // SceneType
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'Directly photographed');
        $entry = $ifd0_0->getEntry(41985);
        // CustomRendered
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal process');
        $entry = $ifd0_0->getEntry(41986);
        // ExposureMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'Manual exposure');
        $entry = $ifd0_0->getEntry(41987);
        // WhiteBalance
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Auto white balance');
        $entry = $ifd0_0->getEntry(41990);
        // SceneCaptureType
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Standard');
        /* Sub IFDs of $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getSubIfds()), 1);
        $ifd0_0_0 = $ifd0_0->getSubIfd(4);
        // IFD Interoperability
        $this->assertIsA($ifd0_0_0, 'PelIfd');
        /* Start of IDF $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getEntries()), 2);
        $entry = $ifd0_0_0->getEntry(1);
        // InteroperabilityIndex
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'R98');
        $this->assertEqual($entry->getText(), 'R98');
        $entry = $ifd0_0_0->getEntry(2);
        // InteroperabilityVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'Interoperability Version 1.0');
        /* Sub IFDs of $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getSubIfds()), 0);
        $this->assertEqual($ifd0_0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_0_1 = $ifd0_0_0->getNextIfd();
        $this->assertNull($ifd0_0_1);
        /* End of IFD $ifd0_0_0. */
        $this->assertEqual($ifd0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_1 = $ifd0_0->getNextIfd();
        $this->assertNull($ifd0_1);
        /* End of IFD $ifd0_0. */
        $this->assertEqual($ifd0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd1 = $ifd0->getNextIfd();
        $this->assertIsA($ifd1, 'PelIfd');
        /* End of IFD $ifd0. */
        /* Start of IDF $ifd1. */
        $this->assertEqual(count($ifd1->getEntries()), 8);
        $entry = $ifd1->getEntry(259);
        // Compression
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 6);
        $this->assertEqual($entry->getText(), 'JPEG compression');
        $entry = $ifd1->getEntry(271);
        // Make
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'SONY');
        $this->assertEqual($entry->getText(), 'SONY');
        $entry = $ifd1->getEntry(272);
        // Model
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'DSC-V1');
        $this->assertEqual($entry->getText(), 'DSC-V1');
        $entry = $ifd1->getEntry(274);
        // Orientation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 6);
        $this->assertEqual($entry->getText(), 'right - top');
        $entry = $ifd1->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        $entry = $ifd1->getEntry(306);
        // DateTime
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1089482993);
        $this->assertEqual($entry->getText(), '2004:07:10 18:09:53');
        /* Sub IFDs of $ifd1. */
        $this->assertEqual(count($ifd1->getSubIfds()), 0);
        $thumb_data = file_get_contents(dirname(__FILE__) . '/sony-dsc-v1-thumb.jpg');
        $this->assertEqual($ifd1->getThumbnailData(), $thumb_data);
        /* Next IFD. */
        $ifd2 = $ifd1->getNextIfd();
        $this->assertNull($ifd2);
        /* End of IFD $ifd1. */
Esempio n. 12
0
    function testRead()
    {
        Pel::clearExceptions();
        Pel::setStrictParsing(false);
        $jpeg = new PelJpeg(dirname(__FILE__) . '/olympus-c5050z.jpg');
        $exif = $jpeg->getExif();
        $this->assertIsA($exif, 'PelExif');
        $tiff = $exif->getTiff();
        $this->assertIsA($tiff, 'PelTiff');
        /* The first IFD. */
        $ifd0 = $tiff->getIfd();
        $this->assertIsA($ifd0, 'PelIfd');
        /* Start of IDF $ifd0. */
        $this->assertEqual(count($ifd0->getEntries()), 11);
        $entry = $ifd0->getEntry(270);
        // ImageDescription
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'OLYMPUS DIGITAL CAMERA         ');
        $this->assertEqual($entry->getText(), 'OLYMPUS DIGITAL CAMERA         ');
        $entry = $ifd0->getEntry(271);
        // Make
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'OLYMPUS OPTICAL CO.,LTD');
        $this->assertEqual($entry->getText(), 'OLYMPUS OPTICAL CO.,LTD');
        $entry = $ifd0->getEntry(272);
        // Model
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'C5050Z');
        $this->assertEqual($entry->getText(), 'C5050Z');
        $entry = $ifd0->getEntry(274);
        // Orientation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'top - left');
        $entry = $ifd0->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd0->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd0->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        $entry = $ifd0->getEntry(305);
        // Software
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'v558-83');
        $this->assertEqual($entry->getText(), 'v558-83');
        $entry = $ifd0->getEntry(306);
        // DateTime
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), false);
        $this->assertEqual($entry->getText(), '0000:00:00 00:00:00');
        $entry = $ifd0->getEntry(531);
        // YCbCrPositioning
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'co-sited');
        $entry = $ifd0->getEntry(50341);
        // PrintIM
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), 'PrintIM' . "" . '0250' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'ˆ' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '	' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'Ð' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'è' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'ÿ' . "" . '' . "" . '' . "" . 'ƒ' . "" . '' . "" . '' . "" . 'ƒ' . "" . '' . "" . '' . "" . '€' . "" . '' . "" . '' . "" . 'ƒ' . "" . '' . "" . '' . "" . 'ƒ' . "" . '' . "" . '' . "" . '€€€' . "" . '€' . "" . '' . "" . '' . "" . '	' . "" . '' . "" . '\'' . "" . '' . "" . '' . "" . '' . "" . '\'' . "" . '' . "" . '—' . "" . '' . "" . '\'' . "" . '' . "" . '°' . "" . '' . "" . '\'' . "" . '' . "" . '' . "" . '' . "" . '\'' . "" . '' . "" . '^' . "" . '' . "" . '\'' . "" . '' . "" . '‹' . "" . '' . "" . '' . "" . '\'' . "" . '' . "" . 'Ë' . "" . '' . "" . '\'' . "" . '' . "" . 'å' . "" . '' . "" . '\'' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '');
        $this->assertEqual($entry->getText(), '(undefined)');
        /* Sub IFDs of $ifd0. */
        $this->assertEqual(count($ifd0->getSubIfds()), 1);
        $ifd0_0 = $ifd0->getSubIfd(2);
        // IFD Exif
        $this->assertIsA($ifd0_0, 'PelIfd');
        /* Start of IDF $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getEntries()), 32);
        $entry = $ifd0_0->getEntry(33434);
        // ExposureTime
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 10, 1 => 40));
        $this->assertEqual($entry->getText(), '1/4 sec.');
        $entry = $ifd0_0->getEntry(33437);
        // FNumber
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 26, 1 => 10));
        $this->assertEqual($entry->getText(), 'f/2.6');
        $entry = $ifd0_0->getEntry(34850);
        // ExposureProgram
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Normal program');
        $entry = $ifd0_0->getEntry(34855);
        // ISOSpeedRatings
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 64);
        $this->assertEqual($entry->getText(), '64');
        $entry = $ifd0_0->getEntry(36864);
        // ExifVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 2.2);
        $this->assertEqual($entry->getText(), 'Exif Version 2.2');
        $entry = $ifd0_0->getEntry(36867);
        // DateTimeOriginal
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), false);
        $this->assertEqual($entry->getText(), '0000:00:00 00:00:00');
        $entry = $ifd0_0->getEntry(36868);
        // DateTimeDigitized
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), false);
        $this->assertEqual($entry->getText(), '0000:00:00 00:00:00');
        $entry = $ifd0_0->getEntry(37121);
        // ComponentsConfiguration
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '' . "" . '');
        $this->assertEqual($entry->getText(), 'Y Cb Cr -');
        $entry = $ifd0_0->getEntry(37122);
        // CompressedBitsPerPixel
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 2, 1 => 1));
        $this->assertEqual($entry->getText(), '2/1');
        $entry = $ifd0_0->getEntry(37380);
        // ExposureBiasValue
        $this->assertIsA($entry, 'PelEntrySRational');
        $this->assertEqual($entry->getValue(), array(0 => 0, 1 => 10));
        $this->assertEqual($entry->getText(), '0.0');
        $entry = $ifd0_0->getEntry(37381);
        // MaxApertureValue
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 28, 1 => 10));
        $this->assertEqual($entry->getText(), '28/10');
        $entry = $ifd0_0->getEntry(37383);
        // MeteringMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 5);
        $this->assertEqual($entry->getText(), 'Pattern');
        $entry = $ifd0_0->getEntry(37384);
        // LightSource
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Unknown');
        $entry = $ifd0_0->getEntry(37385);
        // Flash
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 16);
        $this->assertEqual($entry->getText(), 'Flash did not fire, compulsory flash mode.');
        $entry = $ifd0_0->getEntry(37386);
        // FocalLength
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 213, 1 => 10));
        $this->assertEqual($entry->getText(), '21.3 mm');
        $entry = $ifd0_0->getEntry(37500);
        // MakerNote
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), 'OLYMP' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'Ö' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'â' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'ê' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'ò' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'þ' . "" . '' . "" . '' . "" . '4' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '	' . "" . ' ' . "" . '' . "" . '' . "" . 'B' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'þ' . "" . '' . "" . '' . "" . 'b' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'd' . "" . '' . "" . '' . "" . 'd' . "" . '' . "" . '' . "" . 'ˆ' . "" . '' . "" . 'd' . "" . '' . "" . '' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '8' . "" . 'I' . "" . 'SX558' . "" . '' . "" . '' . "" . '[pictureInfo] Resolution=1 [Camera Info] Type=SX558' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'OLYMPUS DIGITAL CAMERA' . "" . 'ÿÿÿÿÿÿÿÿÿ' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '1Ï' . "" . '' . "" . '' . "" . '' . "" . 'èH' . "" . '' . "" . 'µ' . "" . 'åÓ' . "" . '' . "" . 'U' . "" . '' . "" . 'U' . "" . '' . "" . '©' . "" . '1' . "" . 'ÀæüéÐ' . "" . '' . "" . 'èJ' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '@' . "" . '' . "" . '' . "" . '' . "" . 'g' . "" . '' . "" . '' . "" . 'g' . "" . 'èI' . "" . '' . "" . '' . "" . '' . "" . '˦ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿa1' . "" . 'v?ÏY' . "" . 'œ' . "" . '0•
' . "" . '' . "" . 'É‹' . "" . 'n“ír' . "" . 'Ð[' . "" . '' . "" . '' . "" . 'R' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '	' . "" . '2' . "" . '
' . "" . '' . "" . '' . "" . '' . "" . 'H' . "" . '‡' . "" . 'd' . "" . 'x' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '2B@' . "" . '' . "" . 'd* ' . "" . '' . "" . '');
        $this->assertEqual($entry->getText(), '600 bytes unknown MakerNote data');
        $entry = $ifd0_0->getEntry(37510);
        // UserComment
        $this->assertIsA($entry, 'PelEntryUserComment');
        $this->assertEqual($entry->getValue(), '                                                                                                                     ');
        $this->assertEqual($entry->getText(), '                                                                                                                     ');
        $entry = $ifd0_0->getEntry(40960);
        // FlashPixVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'FlashPix Version 1.0');
        $entry = $ifd0_0->getEntry(40961);
        // ColorSpace
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'sRGB');
        $entry = $ifd0_0->getEntry(40962);
        // PixelXDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 640);
        $this->assertEqual($entry->getText(), '640');
        $entry = $ifd0_0->getEntry(40963);
        // PixelYDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 480);
        $this->assertEqual($entry->getText(), '480');
        $entry = $ifd0_0->getEntry(41728);
        // FileSource
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'DSC');
        $entry = $ifd0_0->getEntry(41729);
        // SceneType
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'Directly photographed');
        $entry = $ifd0_0->getEntry(41985);
        // CustomRendered
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal process');
        $entry = $ifd0_0->getEntry(41986);
        // ExposureMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Auto exposure');
        $entry = $ifd0_0->getEntry(41987);
        // WhiteBalance
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'Manual white balance');
        $entry = $ifd0_0->getEntry(41988);
        // DigitalZoomRatio
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 0, 1 => 100));
        $this->assertEqual($entry->getText(), '0/100');
        $entry = $ifd0_0->getEntry(41990);
        // SceneCaptureType
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Standard');
        $entry = $ifd0_0->getEntry(41991);
        // GainControl
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41992);
        // Contrast
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41993);
        // Saturation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41994);
        // Sharpness
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        /* Sub IFDs of $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getSubIfds()), 1);
        $ifd0_0_0 = $ifd0_0->getSubIfd(4);
        // IFD Interoperability
        $this->assertIsA($ifd0_0_0, 'PelIfd');
        /* Start of IDF $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getEntries()), 2);
        $entry = $ifd0_0_0->getEntry(1);
        // InteroperabilityIndex
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'R98');
        $this->assertEqual($entry->getText(), 'R98');
        $entry = $ifd0_0_0->getEntry(2);
        // InteroperabilityVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'Interoperability Version 1.0');
        /* Sub IFDs of $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getSubIfds()), 0);
        $this->assertEqual($ifd0_0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_0_1 = $ifd0_0_0->getNextIfd();
        $this->assertNull($ifd0_0_1);
        /* End of IFD $ifd0_0_0. */
        $this->assertEqual($ifd0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_1 = $ifd0_0->getNextIfd();
        $this->assertNull($ifd0_1);
        /* End of IFD $ifd0_0. */
        $this->assertEqual($ifd0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd1 = $ifd0->getNextIfd();
        $this->assertIsA($ifd1, 'PelIfd');
        /* End of IFD $ifd0. */
        /* Start of IDF $ifd1. */
        $this->assertEqual(count($ifd1->getEntries()), 4);
        $entry = $ifd1->getEntry(259);
        // Compression
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 6);
        $this->assertEqual($entry->getText(), 'JPEG compression');
        $entry = $ifd1->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        /* Sub IFDs of $ifd1. */
        $this->assertEqual(count($ifd1->getSubIfds()), 0);
        $thumb_data = file_get_contents(dirname(__FILE__) . '/olympus-c5050z-thumb.jpg');
        $this->assertEqual($ifd1->getThumbnailData(), $thumb_data);
        /* Next IFD. */
        $ifd2 = $ifd1->getNextIfd();
        $this->assertNull($ifd2);
Esempio n. 13
0
    function testRead()
    {
        Pel::clearExceptions();
        Pel::setStrictParsing(false);
        $jpeg = new PelJpeg(dirname(__FILE__) . '/nikon-e5000.jpg');
        $exif = $jpeg->getExif();
        $this->assertIsA($exif, 'PelExif');
        $tiff = $exif->getTiff();
        $this->assertIsA($tiff, 'PelTiff');
        /* The first IFD. */
        $ifd0 = $tiff->getIfd();
        $this->assertIsA($ifd0, 'PelIfd');
        /* Start of IDF $ifd0. */
        $this->assertEqual(count($ifd0->getEntries()), 9);
        $entry = $ifd0->getEntry(270);
        // ImageDescription
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), '          ');
        $this->assertEqual($entry->getText(), '          ');
        $entry = $ifd0->getEntry(271);
        // Make
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'NIKON');
        $this->assertEqual($entry->getText(), 'NIKON');
        $entry = $ifd0->getEntry(272);
        // Model
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'E5000');
        $this->assertEqual($entry->getText(), 'E5000');
        $entry = $ifd0->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 300, 1 => 1));
        $this->assertEqual($entry->getText(), '300/1');
        $entry = $ifd0->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 300, 1 => 1));
        $this->assertEqual($entry->getText(), '300/1');
        $entry = $ifd0->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        $entry = $ifd0->getEntry(305);
        // Software
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'E5000v1.6');
        $this->assertEqual($entry->getText(), 'E5000v1.6');
        $entry = $ifd0->getEntry(306);
        // DateTime
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1021992832);
        $this->assertEqual($entry->getText(), '2002:05:21 14:53:52');
        $entry = $ifd0->getEntry(531);
        // YCbCrPositioning
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'centered');
        /* Sub IFDs of $ifd0. */
        $this->assertEqual(count($ifd0->getSubIfds()), 2);
        $ifd0_0 = $ifd0->getSubIfd(2);
        // IFD Exif
        $this->assertIsA($ifd0_0, 'PelIfd');
        /* Start of IDF $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getEntries()), 22);
        $entry = $ifd0_0->getEntry(33434);
        // ExposureTime
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 1642036, 1 => 100000000));
        $this->assertEqual($entry->getText(), '1/60 sec.');
        $entry = $ifd0_0->getEntry(33437);
        // FNumber
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 28, 1 => 10));
        $this->assertEqual($entry->getText(), 'f/2.8');
        $entry = $ifd0_0->getEntry(34850);
        // ExposureProgram
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Normal program');
        $entry = $ifd0_0->getEntry(34855);
        // ISOSpeedRatings
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 100);
        $this->assertEqual($entry->getText(), '100');
        $entry = $ifd0_0->getEntry(36864);
        // ExifVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 2.1);
        $this->assertEqual($entry->getText(), 'Exif Version 2.1');
        $entry = $ifd0_0->getEntry(36867);
        // DateTimeOriginal
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1021992832);
        $this->assertEqual($entry->getText(), '2002:05:21 14:53:52');
        $entry = $ifd0_0->getEntry(36868);
        // DateTimeDigitized
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1021992832);
        $this->assertEqual($entry->getText(), '2002:05:21 14:53:52');
        $entry = $ifd0_0->getEntry(37121);
        // ComponentsConfiguration
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '' . "" . '');
        $this->assertEqual($entry->getText(), 'Y Cb Cr -');
        $entry = $ifd0_0->getEntry(37380);
        // ExposureBiasValue
        $this->assertIsA($entry, 'PelEntrySRational');
        $this->assertEqual($entry->getValue(), array(0 => 0, 1 => 10));
        $this->assertEqual($entry->getText(), '0.0');
        $entry = $ifd0_0->getEntry(37381);
        // MaxApertureValue
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 3, 1 => 1));
        $this->assertEqual($entry->getText(), '3/1');
        $entry = $ifd0_0->getEntry(37383);
        // MeteringMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 5);
        $this->assertEqual($entry->getText(), 'Pattern');
        $entry = $ifd0_0->getEntry(37384);
        // LightSource
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Unknown');
        $entry = $ifd0_0->getEntry(37385);
        // Flash
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Flash did not fire.');
        $entry = $ifd0_0->getEntry(37386);
        // FocalLength
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 71, 1 => 10));
        $this->assertEqual($entry->getText(), '7.1 mm');
        $entry = $ifd0_0->getEntry(37500);
        // MakerNote
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '"' . "" . '' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '*' . "" . '' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '2' . "" . '' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'D' . "" . '' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '' . "" . 'J' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'r' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'COLOR' . "" . 'FINE   ' . "" . 'AUTO        ' . "" . '1AUTO  ' . "" . '' . "" . 'AF-C  ' . "" . ':NORMAL      ' . "" . '' . "" . '�"' . "" . '' . "" . '�' . "" . '' . "" . 'AUTO  ' . "" . '' . "" . 'AUTO         ' . "" . 'OFF         ' . "" . ' ' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '                ' . "" . ' OFF ' . "" . ' PrintIM' . "" . '0100' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '^' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '	' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '�' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '	' . "" . '' . "" . '\'' . "" . '' . "" . '' . "" . '' . "" . '\'' . "" . '' . "" . '�' . "" . '' . "" . '\'' . "" . '' . "" . '�' . "" . '' . "" . '\'' . "" . '' . "" . '' . "" . '' . "" . '\'' . "" . '' . "" . '^' . "" . '' . "" . '\'' . "" . '' . "" . '�' . "" . '' . "" . '' . "" . '\'' . "" . '' . "" . '�' . "" . '' . "" . '\'' . "" . '' . "" . '�' . "" . '' . "" . '\'' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '');
        $this->assertEqual($entry->getText(), '604 bytes unknown MakerNote data');
        $entry = $ifd0_0->getEntry(37510);
        // UserComment
        $this->assertIsA($entry, 'PelEntryUserComment');
        $this->assertEqual($entry->getValue(), '                                                                                                                     ');
        $this->assertEqual($entry->getText(), '                                                                                                                     ');
        $entry = $ifd0_0->getEntry(40960);
        // FlashPixVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'FlashPix Version 1.0');
        $entry = $ifd0_0->getEntry(40961);
        // ColorSpace
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'sRGB');
        $entry = $ifd0_0->getEntry(40962);
        // PixelXDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 1600);
        $this->assertEqual($entry->getText(), '1600');
        $entry = $ifd0_0->getEntry(40963);
        // PixelYDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 1200);
        $this->assertEqual($entry->getText(), '1200');
        $entry = $ifd0_0->getEntry(41728);
        // FileSource
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'DSC');
        $entry = $ifd0_0->getEntry(41729);
        // SceneType
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'Directly photographed');
        /* Sub IFDs of $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getSubIfds()), 0);
        $this->assertEqual($ifd0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_1 = $ifd0_0->getNextIfd();
        $this->assertNull($ifd0_1);
        /* End of IFD $ifd0_0. */
        $ifd0_1 = $ifd0->getSubIfd(3);
        // IFD GPS
        $this->assertIsA($ifd0_1, 'PelIfd');
        /* Start of IDF $ifd0_1. */
        $this->assertEqual(count($ifd0_1->getEntries()), 0);
        /* Sub IFDs of $ifd0_1. */
        $this->assertEqual(count($ifd0_1->getSubIfds()), 0);
        $this->assertEqual($ifd0_1->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_2 = $ifd0_1->getNextIfd();
        $this->assertNull($ifd0_2);
        /* End of IFD $ifd0_1. */
        $this->assertEqual($ifd0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd1 = $ifd0->getNextIfd();
        $this->assertIsA($ifd1, 'PelIfd');
        /* End of IFD $ifd0. */
        /* Start of IDF $ifd1. */
        $this->assertEqual(count($ifd1->getEntries()), 4);
        $entry = $ifd1->getEntry(259);
        // Compression
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 6);
        $this->assertEqual($entry->getText(), 'JPEG compression');
        $entry = $ifd1->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        /* Sub IFDs of $ifd1. */
        $this->assertEqual(count($ifd1->getSubIfds()), 0);
        $thumb_data = file_get_contents(dirname(__FILE__) . '/nikon-e5000-thumb.jpg');
        $this->assertEqual($ifd1->getThumbnailData(), $thumb_data);
        /* Next IFD. */
        $ifd2 = $ifd1->getNextIfd();
        $this->assertNull($ifd2);
Esempio n. 14
0
    function testRead()
    {
        Pel::clearExceptions();
        Pel::setStrictParsing(false);
        $jpeg = new PelJpeg(dirname(__FILE__) . '/nikon-e950.jpg');
        $exif = $jpeg->getExif();
        $this->assertIsA($exif, 'PelExif');
        $tiff = $exif->getTiff();
        $this->assertIsA($tiff, 'PelTiff');
        /* The first IFD. */
        $ifd0 = $tiff->getIfd();
        $this->assertIsA($ifd0, 'PelIfd');
        /* Start of IDF $ifd0. */
        $this->assertEqual(count($ifd0->getEntries()), 10);
        $entry = $ifd0->getEntry(270);
        // ImageDescription
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), '          ');
        $this->assertEqual($entry->getText(), '          ');
        $entry = $ifd0->getEntry(271);
        // Make
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'NIKON');
        $this->assertEqual($entry->getText(), 'NIKON');
        $entry = $ifd0->getEntry(272);
        // Model
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'E950');
        $this->assertEqual($entry->getText(), 'E950');
        $entry = $ifd0->getEntry(274);
        // Orientation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'top - left');
        $entry = $ifd0->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 300, 1 => 1));
        $this->assertEqual($entry->getText(), '300/1');
        $entry = $ifd0->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 300, 1 => 1));
        $this->assertEqual($entry->getText(), '300/1');
        $entry = $ifd0->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        $entry = $ifd0->getEntry(305);
        // Software
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'v981p-78');
        $this->assertEqual($entry->getText(), 'v981p-78');
        $entry = $ifd0->getEntry(306);
        // DateTime
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 978276013);
        $this->assertEqual($entry->getText(), '2000:12:31 15:20:13');
        $entry = $ifd0->getEntry(531);
        // YCbCrPositioning
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'co-sited');
        /* Sub IFDs of $ifd0. */
        $this->assertEqual(count($ifd0->getSubIfds()), 1);
        $ifd0_0 = $ifd0->getSubIfd(2);
        // IFD Exif
        $this->assertIsA($ifd0_0, 'PelIfd');
        /* Start of IDF $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getEntries()), 23);
        $entry = $ifd0_0->getEntry(33434);
        // ExposureTime
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 10, 1 => 1120));
        $this->assertEqual($entry->getText(), '1/112 sec.');
        $entry = $ifd0_0->getEntry(33437);
        // FNumber
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 60, 1 => 10));
        $this->assertEqual($entry->getText(), 'f/6.0');
        $entry = $ifd0_0->getEntry(34850);
        // ExposureProgram
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Normal program');
        $entry = $ifd0_0->getEntry(34855);
        // ISOSpeedRatings
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 80);
        $this->assertEqual($entry->getText(), '80');
        $entry = $ifd0_0->getEntry(36864);
        // ExifVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 2.1);
        $this->assertEqual($entry->getText(), 'Exif Version 2.1');
        $entry = $ifd0_0->getEntry(36867);
        // DateTimeOriginal
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 978276013);
        $this->assertEqual($entry->getText(), '2000:12:31 15:20:13');
        $entry = $ifd0_0->getEntry(36868);
        // DateTimeDigitized
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 978276013);
        $this->assertEqual($entry->getText(), '2000:12:31 15:20:13');
        $entry = $ifd0_0->getEntry(37121);
        // ComponentsConfiguration
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'Y Cb Cr -');
        $entry = $ifd0_0->getEntry(37122);
        // CompressedBitsPerPixel
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 4, 1 => 1));
        $this->assertEqual($entry->getText(), '4/1');
        $entry = $ifd0_0->getEntry(37380);
        // ExposureBiasValue
        $this->assertIsA($entry, 'PelEntrySRational');
        $this->assertEqual($entry->getValue(), array(0 => 0, 1 => 10));
        $this->assertEqual($entry->getText(), '0.0');
        $entry = $ifd0_0->getEntry(37381);
        // MaxApertureValue
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 26, 1 => 10));
        $this->assertEqual($entry->getText(), '26/10');
        $entry = $ifd0_0->getEntry(37383);
        // MeteringMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 5);
        $this->assertEqual($entry->getText(), 'Pattern');
        $entry = $ifd0_0->getEntry(37384);
        // LightSource
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Unknown');
        $entry = $ifd0_0->getEntry(37385);
        // Flash
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Flash did not fire.');
        $entry = $ifd0_0->getEntry(37386);
        // FocalLength
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 158, 1 => 10));
        $this->assertEqual($entry->getText(), '15.8 mm');
        $entry = $ifd0_0->getEntry(37500);
        // MakerNote
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), 'Nikon&,	4
HP08.00d>�X���
[j#�/�\'{�j\\`0[HhX)?�B�O]2�');
        $this->assertEqual($entry->getText(), '308 bytes unknown MakerNote data');
        $entry = $ifd0_0->getEntry(37510);
        // UserComment
        $this->assertIsA($entry, 'PelEntryUserComment');
        $this->assertEqual($entry->getValue(), '                                                                                                                     ');
        $this->assertEqual($entry->getText(), '                                                                                                                     ');
        $entry = $ifd0_0->getEntry(40960);
        // FlashPixVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'FlashPix Version 1.0');
        $entry = $ifd0_0->getEntry(40961);
        // ColorSpace
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'sRGB');
        $entry = $ifd0_0->getEntry(40962);
        // PixelXDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 1600);
        $this->assertEqual($entry->getText(), '1600');
        $entry = $ifd0_0->getEntry(40963);
        // PixelYDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 1200);
        $this->assertEqual($entry->getText(), '1200');
        $entry = $ifd0_0->getEntry(41728);
        // FileSource
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'DSC');
        $entry = $ifd0_0->getEntry(41729);
        // SceneType
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'Directly photographed');
        /* Sub IFDs of $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getSubIfds()), 1);
        $ifd0_0_0 = $ifd0_0->getSubIfd(4);
        // IFD Interoperability
        $this->assertIsA($ifd0_0_0, 'PelIfd');
        /* Start of IDF $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getEntries()), 2);
        $entry = $ifd0_0_0->getEntry(1);
        // InteroperabilityIndex
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'R98');
        $this->assertEqual($entry->getText(), 'R98');
        $entry = $ifd0_0_0->getEntry(2);
        // InteroperabilityVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'Interoperability Version 1.0');
        /* Sub IFDs of $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getSubIfds()), 0);
        $this->assertEqual($ifd0_0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_0_1 = $ifd0_0_0->getNextIfd();
        $this->assertNull($ifd0_0_1);
        /* End of IFD $ifd0_0_0. */
        $this->assertEqual($ifd0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_1 = $ifd0_0->getNextIfd();
        $this->assertNull($ifd0_1);
        /* End of IFD $ifd0_0. */
        $this->assertEqual($ifd0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd1 = $ifd0->getNextIfd();
        $this->assertIsA($ifd1, 'PelIfd');
        /* End of IFD $ifd0. */
        /* Start of IDF $ifd1. */
        $this->assertEqual(count($ifd1->getEntries()), 4);
        $entry = $ifd1->getEntry(259);
        // Compression
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 6);
        $this->assertEqual($entry->getText(), 'JPEG compression');
        $entry = $ifd1->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 300, 1 => 1));
        $this->assertEqual($entry->getText(), '300/1');
        $entry = $ifd1->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 300, 1 => 1));
        $this->assertEqual($entry->getText(), '300/1');
        $entry = $ifd1->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        /* Sub IFDs of $ifd1. */
        $this->assertEqual(count($ifd1->getSubIfds()), 0);
        $thumb_data = file_get_contents(dirname(__FILE__) . '/nikon-e950-thumb.jpg');
        $this->assertEqual($ifd1->getThumbnailData(), $thumb_data);
        /* Next IFD. */
        $ifd2 = $ifd1->getNextIfd();
        $this->assertNull($ifd2);
        /* End of IFD $ifd1. */
        $this->assertTrue(count(Pel::getExceptions()) == 0);
    }
    function testRead()
    {
        Pel::clearExceptions();
        Pel::setStrictParsing(false);
        $jpeg = new PelJpeg(dirname(__FILE__) . '/pentax-istDS.jpg');
        $exif = $jpeg->getExif();
        $this->assertIsA($exif, 'PelExif');
        $tiff = $exif->getTiff();
        $this->assertIsA($tiff, 'PelTiff');
        /* The first IFD. */
        $ifd0 = $tiff->getIfd();
        $this->assertIsA($ifd0, 'PelIfd');
        /* Start of IDF $ifd0. */
        $this->assertEqual(count($ifd0->getEntries()), 13);
        $entry = $ifd0->getEntry(271);
        // Make
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'PENTAX Corporation ');
        $this->assertEqual($entry->getText(), 'PENTAX Corporation ');
        $entry = $ifd0->getEntry(272);
        // Model
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'PENTAX *ist DS     ');
        $this->assertEqual($entry->getText(), 'PENTAX *ist DS     ');
        $entry = $ifd0->getEntry(274);
        // Orientation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'top - left');
        $entry = $ifd0->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd0->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd0->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        $entry = $ifd0->getEntry(305);
        // Software
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), '*ist DS     Ver 1.00   ');
        $this->assertEqual($entry->getText(), '*ist DS     Ver 1.00   ');
        $entry = $ifd0->getEntry(306);
        // DateTime
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1106749970);
        $this->assertEqual($entry->getText(), '2005:01:26 14:32:50');
        $entry = $ifd0->getEntry(318);
        // WhitePoint
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => array(0 => 313, 1 => 1000), 1 => array(0 => 329, 1 => 1000)));
        $this->assertEqual($entry->getText(), '313/1000, 329/1000');
        $entry = $ifd0->getEntry(319);
        // PrimaryChromaticities
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => array(0 => 64, 1 => 100), 1 => array(0 => 33, 1 => 100), 2 => array(0 => 21, 1 => 100), 3 => array(0 => 71, 1 => 100), 4 => array(0 => 15, 1 => 100), 5 => array(0 => 6, 1 => 100)));
        $this->assertEqual($entry->getText(), '64/100, 33/100, 21/100, 71/100, 15/100, 6/100');
        $entry = $ifd0->getEntry(529);
        // YCbCrCoefficients
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => array(0 => 299, 1 => 1000), 1 => array(0 => 587, 1 => 1000), 2 => array(0 => 114, 1 => 1000)));
        $this->assertEqual($entry->getText(), '299/1000, 587/1000, 114/1000');
        $entry = $ifd0->getEntry(531);
        // YCbCrPositioning
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'co-sited');
        $entry = $ifd0->getEntry(50341);
        // PrintIM
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), 'PrintIM0300!�	

4����������	
D
������\'\'�\'\'\'q\'x\'�\'a\'\'');
        $this->assertEqual($entry->getText(), '(undefined)');
        /* Sub IFDs of $ifd0. */
        $this->assertEqual(count($ifd0->getSubIfds()), 1);
        $ifd0_0 = $ifd0->getSubIfd(2);
        // IFD Exif
        $this->assertIsA($ifd0_0, 'PelIfd');
        /* Start of IDF $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getEntries()), 30);
        $entry = $ifd0_0->getEntry(33434);
        // ExposureTime
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 1, 1 => 4));
        $this->assertEqual($entry->getText(), '1/4 sec.');
        $entry = $ifd0_0->getEntry(33437);
        // FNumber
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 45, 1 => 10));
        $this->assertEqual($entry->getText(), 'f/4.5');
        $entry = $ifd0_0->getEntry(34850);
        // ExposureProgram
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Normal program');
        $entry = $ifd0_0->getEntry(34855);
        // ISOSpeedRatings
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 200);
        $this->assertEqual($entry->getText(), '200');
        $entry = $ifd0_0->getEntry(36864);
        // ExifVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 2.21);
        $this->assertEqual($entry->getText(), 'Exif Version 2.21');
        $entry = $ifd0_0->getEntry(36867);
        // DateTimeOriginal
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1106749970);
        $this->assertEqual($entry->getText(), '2005:01:26 14:32:50');
        $entry = $ifd0_0->getEntry(36868);
        // DateTimeDigitized
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1106749970);
        $this->assertEqual($entry->getText(), '2005:01:26 14:32:50');
        $entry = $ifd0_0->getEntry(37121);
        // ComponentsConfiguration
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'Y Cb Cr -');
        $entry = $ifd0_0->getEntry(37380);
        // ExposureBiasValue
        $this->assertIsA($entry, 'PelEntrySRational');
        $this->assertEqual($entry->getValue(), array(0 => 0, 1 => 10));
        $this->assertEqual($entry->getText(), '0.0');
        $entry = $ifd0_0->getEntry(37383);
        // MeteringMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 5);
        $this->assertEqual($entry->getText(), 'Pattern');
        $entry = $ifd0_0->getEntry(37385);
        // Flash
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 16);
        $this->assertEqual($entry->getText(), 'Flash did not fire, compulsory flash mode.');
        $entry = $ifd0_0->getEntry(37386);
        // FocalLength
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 45, 1 => 1));
        $this->assertEqual($entry->getText(), '45.0 mm');
        $entry = $ifd0_0->getEntry(37500);
        // MakerNote
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), 'AOCMMH��\\	<*�� 2	"
��a�-	2��� !"#$%&\'����(����)F+D,-�2345.�36�7:Ff= >?�AGHIO$4$Dh	�
��
���������		�	 �  C p(p`Sj(@�hj�@�p(�Q�(�fI�`<M|�����	v*�� �?;���iXXVUTVTYWZWY[Y[V^4�  �?�  9+  �  9�=�  !3I  ^-�  &*7  �*�1͢[��@����"z���]^_ZZ[[\\\\]�����		
 $.\' "+"(6(+/1343&8<82<.231		

1!!11111111111111111111111111111111111111111111111111����!���	
}!1AQa"q2���#B��R��$3br�	
%&\'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������	
w!1AQaq"2�B����	#3R�br�
$4�%�&\'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������?���(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(����/�}�#�/�#�W����F������ҿ���"7����;�ϧ�D�]����sI��O����J<9��ϯ�D��H9"���?�����i�����"?���.����kI��O����K�֓�>���ƎywH��֑�>���Ə�F�����ȏ�4{IwH��#:G���G�_�Ft����ȏ�4{IwH��Α�>��Ə�F4����ȏ�4����$C��#�|��#��/�#G����G�=���$@xcH��?����K����>��Əi.����_G��?����K����>��Əi.����[G��?����G�"�?����W�=���${����>��Ə�E����ȯ�4{IwH��"�?����W�?������"����%�9#�_�Et���ȯ�4�)��ϟ�E��%�9"/�"�?���W�?������"����%�9"��h�����_�i������"��������E4���ȯ�4�\'���<��+��/i.����OG��/����G�"z?������G��p��\'��ϗ�E���KG��/����G��p��#�ω����4�����������]Ò"�#�ω����4�#�ϗ�E��K�rD?������"�������>_��Əi.����GH��?����G�"ZG�������G��rDO�D�~���Ə�D�������Əi.��?��������O�E4�����Əi ��+�Ϡ����4�+�Ϩ����4{I$D��[F��Q�_�i?�ч����G�=���!����>���Ə�E�_��?���Əi.��?��q����?���1��ϯ�D��H9"���������\'�#Z/�������O�K�rD?��������O�F�o��?���ƎywH��ލ�>������<9�ϙ����4s˸rDO�G4o��?���Ə�G4���ȯ�4{Iw$@�sG����_�i�tq�.��ƎywH�����>��ƃ��#�|��+����>H��G�����ȏ�4���i�����h�p�i�����h��{I?�����h���.H�����>���ƃ��\'�}?�#���A����ֿ��Ɠ��\'?�����i��9"l��)�qPX�W����!����Q�/�?�)�H�Z_$z҈WրB���R��(�i|��b�֍�H���bv�j��Sҍ��(})@_J/�E/�;
/�/����
�>�XB�zʂ����0��@^���7Ѿ�0�y�7Ѽ�\\搹���.}hB�ր�OZJ`!��v⒘	E!��(
%%\'�f��% t���0��	�L�L�Ҁ��I@i��`.iE 	����Pis@
�.h�&�h�.h���.h����=�is�3����Z	��P@h4��(�I��Q��Iހ
J(��=i~�RCI����ZCM��!�bJ
\'� ��{Qސi1L"�O�E!��Ҁ�RP�R�)��=iE ��4��
^�����hEAH���FhE��
Zhs�(��
^�c��ҚJ:�Pit��	Gր�ސ	�
0
oր�%��N�����C@E!�RPE%����J(������@i()8�Y�.)��Q@@��/ր��@Kր
J(��Z:ўh�PR�Z��PK@	J(��R��;Si(�I@��@	����@-7�)�RP���JJLR@zJ!��@���A��4�JJ%%
!�PC�4��ޔ
QJ)��)���
p�Q@
R� ��(����=�OҌ��P��z�KҀ
1�ZZ()i��)������(��@	�(�4L�I@9���Rb�	I@\'Ҁ���Q@	Ғ�
B(�R`!��(�0��Hx�X��@
9�P��:R�)h�h�� �����
^�Q@K�j(��ih��-%.3@�1E����Rg�`&h�ސ%\'zJJ})��Q�JCց��zJ
%%&(��I�@GzC@���%0�\'zi�HBRS���^�P�Z@��u��K@��-/A@zZ@�R���.8�sK@��
\\z��@�
Z>�P�J
 E0�R4��J1@\'n�RPR)((>�)���\'zBM0�CE%% PRf�	G�?ZLPJJi��u�q��@iE-�(���Q@
:Q�@(�������R�����P��(�(@���PK�
�OŠ)8��`%�	�)
֐�Rb�IҘ	HxB(��:RPI��4ib��sL��@�=h�B}i
4�P�QL�RE�@
8�*(h�����
@:�)h�K@
?Z3�1��Z(�P�F3@-P�/j@�`v�E%\'^�
%&h�E4�*:t�Q@	�CH�i
1�);�y�����
�@���i=(>����S�>��%!�LBCҀ-�QL��GQ@K@���@(4QH)h���P�@�@�PKրK@�Gj1E/SE�@�ր
(1@�J=�f�@�4���RP18���4RJC@��P1JOZ���%%�
�4}z�P!
!�x�;�L�� ��R����J&�
Z;QH��cߊZQ@�K@JZz;��(��K@����-Qր��Rv�ރҘM%QI@	I@��RPz?�%!�bQ@�4��I����h�1)(
!�4%!���!���SE��ހҖ�E�R�1��4~4�Z:P�MJ_�-;R�;Q�ZZSI@�Qր
)g�zLPqHE0
A@����&�4��P1�����Z!����b�
Jb�h�GҀ�v���!>��@	Hh�(������w�4QҀ����4J(R�h�ڐ.qL��H�K@ҌP�Z(�4v��ZJ\\��@	E��)
&h&��� �Fy�s�L��(
!�f��h�4�����BRPf��	փ��h4�%!4)��4�xQL���(��({�@	K�)hiZ.H�9��4���GN�K�R�)E4�����}(s�HX�P�b�{�u$�q��dG��`N)�L� x�:���Piu�<"�Pe�@����H^EY$��O&�1\\D��D��R�3���&:D.b7&�7��+�RPf�x�>��}�X�<P[����M�f�<��V-�8n&H�dG�Ka���RT��nV�Uߐ0�\'���iX��)7q@\\n�z�f�ҟ
f�)���qL���43c�4���&��Қ=�RqH#9�6I���&}i	���2J`]���u��8�4PG8>��u}��<1y0n���1#��Rh�m<1�T{љ����ț���o���KibeiIc���N�R��a����=)Xw,O!KyYAT,tw�cT����2�t�w{��*k6,�pw`t8��=��z����[�w�	I���b�BO�[D����7�
AI�l��̳|���H#�4Y�ж��ѝd�v:�H��/�7v���v�v�j-�_B֭�T]�lfز�;�f�Op�@�N�#NI���Zf���Kۼy��!�b�X�A4q�q��V=�:9Xs����򭧑 %d`�Z�T�Y�%�=OqG(\\���+�m$�>�-F9���K���v�y�8�"�9��_J9E�9uiZ�n-�Cpw�USNէ���I�ݡb�_$�q�zf�(\\��^]K��G$x�6����?�M�A5�ڇ��f�Y���ǰϥ+Y�tc���m-���4\\�1LO!O\\�;��y�����+�l2�iؒ#Y��jK$�p�V/�ջb�|#�Q�����x�n
sߚ`t:|�Kg[��m~���5��z�V\\I�#�Ǧi!�h\\����C�7%�i^S��s��s�MMf��_��9��T�ʘ
��G-��4�n����I�Ƿ�IJ�Ϙ��F��S.B��"��S�$����^��).]k�^�q~����2᧹��&m�o�
�:����
���>M�B-��L(��I�!�V�O����\'ن���ݍ$Z�חm+��K1���N�Z�k����n#IX(�g�l���;ćO���^�7#�=��Y
ܽ��a�n��i%�0���H�^kK���)w��C��\'�λovU16v�3ҙ/�F��
��+3��t	�$�H�4��\\\\K:�:)�$�Nb�m��)�ݳp��:��01�}��a�ޤ��=sO���Hb)��3�@�r)!y�t��s@sM�>�`}1HN0
+ci�3�(��O�/ށFT�y>������Ѣ��ҔP�� ;R�
3@z�������A���d�m(m���?�z�IBd	$�F���N�ۙ�1ʹg�Z̙.�t#��$ܸ%��w&�al���Yzj`Ys��sR�{�y{|=z���`�)��������PD�&^:�"io䵝����ŕRv�jg�%ݥ�E�bB�>lc��}D\\��mR)"{��jI�N�`0*���}��!`�����OR��Lk,R��Eu�_��Q�y��f�[�2D�w>Cm���M�A-RW�����_)����S��[?��E"���B����	��jP�i$�d�*����9���,�����X}��ُ�a����ƀ�x�lLQ���I�N*���K�����K�9�$�Б��ֽ�!�n�&��s�Տ�든Cm�y�T�ϣf��l�����W�(\'
|���)5�K۫����[th���ݳJ�㳰٬�n켧�g�����RE*i�W�k�H�BbTV�ש��,Ȣ��	"����<x\'s��b���UY&H$�┝�!9�=���N�V����`�}j2�K?��ec4� �`i\\��t�.^�[v�́��e[5Qt[�
Ѻ�ڣ��6��ji��ƕy$��]ݣ}�����x�~�oK�6v���ų�u9��H�]ek��qvct��ޒ
b���JI����G.y�9��d�A�1$�����9�Jl�<�d��D&J����J.%��b��Ycv�c�<��R豴r*���1�XQ��E�(�Yf��Y%���㡩��cxmc��Z�d9끎h�P}:6�yD�+ΡX���*�ql�.Kc��i\\v!��9�a�$��;px�P�q���9ފTs�N�b)t�i<���|�ߞ�G6�o4�!iW�9uW 7�Q�����q,h�UzR�"��(�j��@Tf�Pq@
EE!�m�m�j�)6���7#�Lb�T`��B�=���M##Ld`����hQ@J(x��)Q@B���ڗ��dw�ڧ�^�ԝ�Ao\\s@Ҁ������(�ݏ����$�e{�}��vq�!f,ř���4�dqMyQ�C>v�y8�H�ix��-G�PK�1˷=I�U._Ooq9��������85
��\\��lr�;R=h�촘^h��0��f+����?<X�鑑C�6ЛuGsq�-4ͱ4��0 �FGZA
�r��l��)c��Ҭdg��A���
J5��6��!ES�����qmu�yձ�)��?x��5o�u{�����lqHɻ�${Q6����kk}�M\'���n����&���:��(��H�\'��EK�^�Ԙ��J��z�&�wԶx���ySN����$	��	��BW�6]CQ��佷����69\\�jե�Mwn�B�Wi�r3Nˠ�}H\'��I��S����S��U��T��/]m^-�ʌ��AvlE(��e@p�~U������p�["�F
�q�B�Q��,_�^Y[C9�"�~z�Q����{��-H��|}�=�[���)M�]�g<���;s���o
�L��:��� 2)��4qA��()
DX�����=逇$�
�m\'>��p9���0��(9$@6Jk0����F�2x��t��ZNi3�M�:�n��/Qց�E-.h�Fi�����6����n�֜�ډ�[ql 31c�q�z�w�{�S�io-�E�2�3aW�ޛ�#���?���O�ҕ��UԮ��Ԍ,p���<��Qkr�!i�㕂���ɟ�N�fi��RZi�\\D��q�~������c�� 
,~f���c<ԫ
��
5���墎E����t��Pũ�<7�)v�"�\\nS�c��v^���u"�����$>��*tH��j��$,�1���-=QڕΛ��y�L��}���9Җ�P�:���9ߺ-�2(��.�b��,�-��J"if�FFj����v�~}� �r�ǹ���x�
�������yduiv�b�3�L���Yɬ�3ȑ�U�����,߽�ڙ���+p���.Tq�n�i"�O�Y�n��5���pv�>��A���~[漙�\'n�F�U���f�~�q,AV3��nI^��!�u�ė:w�38c*��E�ft�û��*7p:GP��v:�=���	g���v��g\'���M�75���K 8�$�)"�@/i6��kױ�N�`�:�M��av�k�%��?�c+Kv=�GOYž�),�Ne\'��2?SI�2�i�d���I��qU{��kp���Ǽ����x�Z�#3����c���l�divws�zm��1t਌�\\�Mj�;+KRVE �����}Emv)n��F��
�6�
�B����lsOM�� 3�!躚�0���Y���\'��x��Ǯ�hA#E4Di#{�����0Wo�?J����Eٳ������-.�h�,W���OCV4��m�{�VEc��LSrF�P#ڣ\\�����H��"�	���ڒ����׼�V���N���yq��	9����H���l���>?��4�[�d��I�2�s~r1�f�mt�+YD�@ס�8��H��J��>��4��1@ �֑�PO�9�J9a���53�9�����?1��#�*6��Lc��798�aȦ��:��S�b�z���e9"��hf�)zv��(�E 2?�&8�^.��{U��u�ng$m�T{�UrR3�G��m�Xf1!B�gh9�E2]>KKy^yc�����v�#>���M���}�����m�3EʮO>�MZ����G��t_�Lt҇d4���Swd�+mݎO��Pl��c�,6�F<w��ܫ��$�h�O1gi@uʜ�4�Z�gqqy{:<r �c{sN���xj�ȶy�0i[��98_��VuK�x)����S�<�M�4����T�����6?xq�%��:\\,�wfr��P�@�rZ.,�Z-�B]��dw"��ӞK���\\���v�
aۯzW����I�Iab�/V���WC�eВi]������qr�M����h����硥�Ƿl�4��q�v�=�
&�i�`��Y�s�\\�w43\\���x���7�@��G�{x"M�y��6���ބѭ�xB�[�y��$�ޕÕ&�m"��J���z�C�Oz{�Vmi��Dq��S��}h�Y�ӭ����wq,Il}j[�Xn�V�0�0�b:R���Z��-p��3.��Ȩ�M�{an�)�v��֝�đ�‹"�j�|��C��Ev�1�C[��T�ś>���
���$Pr.EC��N;hQ��6�h�Y�a%�I(9��VDȊ�*��AUmt��Y�hd}�}����v-~4�1`���&�$�x<u��p;PL�Ӯ��P�v��Ҁ�Pi���ii�bPi�LR@��!�BRb�M4�QҀF9��L�Ph٥�)h������{[���tPA��6{�Isx-̻����߻aN¹4,�����S�������=��yJB}��e�\\��$���r	U\'�2��.�Tg�=AEI4�C�,����I�E�USГ��ѕ�2T��:�/-�SOI�h`M$���lU�"R.
L�D�4j�Π�g��b�9A1���T皆mF�	�2΋\'�s���E��j�Ǩ���Ǹ6{�~\\�zf�oq+<����Q�gҝ�6���R��_.y��3��]j�v����.��\'p��+0���a��tp�W!��Pϫ�Z��W&@����p{Е�{	�c,��!!�Um�.}3�Ku��[L���ddB�>��+2q���c<� ܫ�8��Sb֭$���KlG��ހ~4�D�:�7s4!$�`7l�pH��jwèi���$���p�X/��&�$Qi��$�$����?\\}j��bHgi�)`P�	��Ю=�|Z,�e�2>��/�s�)�[U�饂H�P��C���C���o�[IwV7~3��j��\\]�B�v�@/�	=�Xi�sK3��,���(��`��c��Ju�B��Y�Ǜ�g�;})�W�4z��jr�Cm�b+�M�Fj?\\\\�[DmG&U�c��hKPoFT[���nV��B�υN*V�7Y@Ѣ���P#�H�I��»D�^��7[\\",�7nV�j7�0����Ď�+��\\QmG}
��OS%�H.a��?+=E^��x�kePVerI�0(�\\�][P:K߼p*�l����5�k�E�q��(NP�i��jZ��΢���\\�Fs��q��nuY��Ha�p���h?���^�Y
�[�ZUh!2Em+��;�̣�z�i�\\6�p�,�B�L�ҧ��׊,̵�]�<̍u
�{rF�ЊԤ�[x�CR1��Sh�t�bRt�"�����@���RP��qL��%(����@E 2t�T��C?��u&-y{���N��WR:�0����I"+6�\\�E>�8�����~�y*yQ�?b��{�?l+v9ě��;��tWZu�>s3�l�0x�7�%ҧmJ�9���Aq�y�¬���-����������2� �I�)�G�Y��-��tR��>_,7t#�S�K�I
����v�QX���0gB?�y�iDr4`��Kmi�5g�d�x��}:��Q
N�o)��ە?��jm���d����2���k)m�ӯ������F����Q�=7���]�؄9���tʼnW‘2&�l��w������ߥ��[��X\'��R8�z�b��Z��4�(�,,G�9^F>�hK^R�=Ҩ�)��j��L5�ٓ���\\���Or�08�����0�RF�q��Q�y�K��$bDp�1�\'�$�Ni,嵺x%�\'�X�D%��Q���Muiq*E*�w�#��s�qO`�4�MKώ+�T�m����jPK&��:!d������SԮ�B�]��X2��!�y��\'�T�����.��H��E8�7͒qOM�g�o[���j#YZ?�HN�qY��\\���H����6rG��_j�w4��O�.�e�"ٖ��-�-=^o�ӓ+�MOA�-�ɬI+/�^��ݞ���m�ɧ
.K`aL��6��zS������o���ˈ������v�k���4�����Ҿ���,�g]F��d	�F���:�sh�,��9��Wo)��}}i�V/i6rE<��o
�a�c�@�I_V�ƹb֪� G;X��z:�����n�`��S\\��ʣ��z��i>��Њ4�Yv+d�:Ӻ2��g%����2 #���J��s�ڃDc��3�n��uk����]���e����w��q�O�ӯgXM���T�s��c�.�f4h����K9cib��4d0��K��vm_7enÂ���J/p�
?N�+滺h̅6�~>��I�4�!��1(�bJJC����ϥ�րx��R�:R����)i���3�Ѭ���"]�I�jTӭ
��
yg��})ݓʆ�����%� �:���N�Ьr E�!%��=h�c� �H��
��NA9�
	�[5E~J��zl-m�t�3il��3;r:n5.�j--�l�ܒ�ެy4\\,-͕��������A�������{qJ�	�WM:�C�m䍣]���(�0TP%�:��^X��xJ��"�Ԏ��^q�Hb���\\9�1�) �2:R��`�N(J��2:g�8�"��k\\}�d�wM�ib��HL�*4`d�#�.F����T���pqɩ�љ�����ݷ<�֍B��lWr�|�a�
��m��-��VP�\\�I9$��w:R�b�@}�(�8.‹�ā@56�(01F)���x��b��F�,�Ȁ�lr(ؤ�(���CGpi1�@z(	z�w����Zn��@
w�cAa�|�d���(c��L�O$q@8<�i#8���Pڐ��@	���@-���$�Ҙ
x�,;R�z^��(�(�4f�4R��6mYQ���E	�ȣ �Y���a��@�8�F��s�*�Cd���ųڋt,@�ۚYuWV�Cj�?�0{��E�}D�Wȉl�3�,~`��;�7:��Iba�q�1�@$�x�:�a_��T��R��v�/���ڦ�A��sā�6�N:�h�\\#��ʹW�!pN���ֽK�i��2j76��N����Q]f�h�<�ug�./��~����4P̓¢�9%Uo���~����Z_�/�j�����#֝�qa�e�!y>��L�vF�t�B}j�}wyw8���+!9;�:PՁ2=a�Ʊ��,��_�9��Ҩ��}m��\\���QL��/�<��K�-]kNn�1�
�DV-($�Fp1W�K��,Vi��#ғVwe68�������$���C�8~5
���Ԣ���ٚ��� v�"�F.4h��Hs3ƠLP�}�֭�4~#�$b� �;���b�������(��\'CH����(�Rv��S7��Ms����!8>��0�֓��Sӊcc`����ӵ&pW�:PAb)q�h2��)N6�Ҁ�3Q�z���i��@�ŊR�0�p0@�H~`O�pF{�P�<w�o�i�p�xQ@��E.iz��}ihG�\'s@H�v��٭���� ��7��X�����c��F[��!&M��,�[�����A�@�f˧4sܖ�k������{{P�4Ms`��5�Ή?v�Y۞��cr2��Vr���z��p�%u�`v��3uw֗Y�y����R����g��i\\-���mONY�5��@Fݟ��{
ٰ�{�1uU	)E �p�cE9�!�n\'��$[�PK661�zn���o�����?����]XVc�t�幸�Cc�,�ʌ`�
:�����bH�z.cm���x"x�c�"J�8����Y���.T����i�qI��3R��{�K�f@��ć�#�F�[�.�к�&��&�s�{\'�|��"�	�U�>���9e3?%��d�LiX�.�s̳i�	��x�r3�)�hҬ��s��q	��\\s��;�ƍ���m"�ݻ�@��3����i�O|�V�f��~Y���{���%���#Q-�����y`e��׫��
){q@“����PPz�I�:ri�ROJ(qI@
*8��s�@��1��*1�L��ؠt��Jf����9�*��&�1@P;s@���jҀ��
�֐��(�q�J1@4.3���4J\\z�(�(�sLB�@K@�R��(qK�B��1qF(G2��GP��FA�-��KW���5d(�Ĵ����8R����\'SJ(�(b�����њJ)�f�h�H��!���A�bu��@	H(Rt��\'�"�@�4��"�`\'ҊOjJJJJJ
\'J!��4��b�)�Z;P0����_�v���P�րt�- Ԣ���R�^�K�Z(��ZQ@z(h��PRP�;R3Hz�I�)	�JN�Ԕ�;�@	I@��h1�N��
C@�4�ր��w�=i
6��~�Pm0�I@	�C@�����04�)h�K���
)���3K��!h�aN���p�P 揭Fy�֔P���њL�Zp���n�d
\\�g4�1�X���J	���A�HR>�S�" �0PN9=�I������i,�8�#g<`0$ԟi���<��q����ҝ�]��TM*!s��q��Q]���`\\L�O@O4Y��;�y i�T1($�<
�=^��*�FI��u��WE�1��&����5�S�=
	\\m�[�T����zr
EoyĒG��#��rjN��Q�JJ)
%���i���ZJC@��4`Q�AL�GցiEK@��� 2.�v���H�V�#q �MhY]%ݪO�XwMuzث�vq�q2�9 lS�`�j��Wq	!m˜})4	����P��n��<��Io�Z\\N�F�3���F�i�1����]6eyY(���U��^��V�˶ϾUI	�"��}Z�	c���M�#Rۇ�Y����6H����;� �V��	�}�m���c��z���o$h��	D�����P��+K��}������>��NI�㊟Nք�ڤ�L�JɅfǭ;�ҽ�����;Pv��e������JWx�ڕ���&h�����0Vul*�S���m���qK��W`�@�{S[�-yTy��Ag�o��뎸��ϫ�.n!��y͸�`�+��mZ�[�9��-�w�lT�Z԰��\'6�א������Y��gK�ؾ^��?�=���v�I&�I%��wٜ�h��A�@/潕��̪?��������g0,�K&8�@{�z2uC.�菉�LP4k&�ѳc$A�u�i�e����t�.YC#��7z�cw����@�J��r�8�s��Pf���.�r�>���;��9��^�S�+6�R{[�!�TF-̪}H�P��n�K]jk�k\\F��Y�n�?(��b�����ɬ�8Pܰ
K`�O_j�$M�Ol��K�=���&,�fy8�1[vw
wc�mi8냊N�W9�7ْ���������V����.^+�IT�҃�1�S�bWE8�ٕ���E���P�>����%Ɲ4P��u�$�VcN�•���(u
:KQ?is�I���_�ld�h��N�j�,n��w���wjȹ�f?�*��w7w�7
e��7s�GJ6C�A���[��_g`$��#���&�Ң��J*Ί<���>��cg����Gd��P8C��j��R�}�F���̠񚝐��Y�.���L2f1�q���h��k}h�v�ԤŔ�X���*�2nut���B�b���L�R
%0�����@�cހ
C�!��4g�b>����>�R�ZZ�����X��bL`{V��"Mc��J�8�7�sHl��F������x"�t����W
!��|���Sb[�o���DdycB��A`�:�f�O�K4ȭ���RFP�-f�x��H��d�1ʩ<>�=�A%�s5����C����F�T�����f[��3VtX�/�oB��]�F28楖�N�N�}k�(M�ؒC��*�oct�-�K��V(�;W�:w&̷s
��݁���U��������n��2Z)".?��4�f[�������7��{�޲��yc���[[���d/3d�O�J��4u�G���	\'�����VWO�Du��.�K"�pjn;�:K�[V�ݦV��x�^�jڳ��+�A�ae۳�Tؒ)[�]�ť����ˉ0���U.t���$�2ܱ?�ix#<`g��Vv/]�ך�)�}�`��A&N�=x��dfkd7	�\\|�Fi2��[�{��<l��"�ntۓ�g�k
�7h�^�
�}Zs)Ie�f��7ϰ�"��-%��2@Vy�Efc��jwLVhtzE���rV�g�ZE8��TwZ������oJ����\'�����е�w���@�T{Bzr
A��gQlp�|��S�Rٕ�o�y:ķ{��#�Aو�Ҡm�,m�"��7gi���;���k`����9`G`F*}:ݭla�r�P	��f
଑4��mq�)��y�w�h��I�v"h�{�Ӹ�U��/U�K�ż$Qp�cZ7֩yi%���q��Z�iw3$ү�"�W��q�ja�U��+\\����xq�=sE��� �C�k��Q)|u����s�̷�qas�v��b���⋇(�h�Zܤ��\'�RR:}_��ȷ�-���.q�)^�J����<Ѵ�N�$i,��U���
\\�����;ev�	<��X�l����f)���A�X��֊���I@	E\'zJ`!�4�JF�I@i
\'zJ%!�|њbR��K���P����4������9J:��`iH�s�L�y�2o]����$2C)�n�G�Mq�$i"#2�|��q�/�ڝ@C0�K1¨�>��#��R6I����s�Z,s��/,��A�z�S�E���0Ƞp
- !��8f�\'?<Ą끓Kwu���;m�1����;��*�J�ڪX�v�i㸂9c?$�}
+!84�Ekp�,�Y�0x>�0 �"��.Vܷ�K�™a}���=�I#
׃�v�����!�5�R-.$yU�{`*��մ�^�[*� Ӷ���+5�cQ��r΅�ϥY��7E+ʰ_��7��a`���#5e�73����ܯ}x��2\\��.p_Ƴ�W���M��Íń��=qT���=ީ�@��������A�\\�y����e�����E��_ڗ��\\Emd%X_n�(_�S�j��t�3!��%$C�;Qas�T�3�n�M�5l��[Z	d�,&Imy�{f�P�i�M%ɵ��0LSz|ۃ
��^}�ܳ.��H��aCCL}���y�y��4�yl�	�h��ѷpiY��{�"��Z�r���GZ�}B��P�2�q�	�¸�_�Gr<�#��[<�RhVX�r0�>�Xw�JC�������i()(8��BqI�CI@�T!iz
@PҌ��@��Η�r���P#��F�jv�����S�9��ҩ��.�����I娙�Fr|��iuUk��Y ��T!���G[�K3-֒m�,���H��#���W4���{5�����2�i0C�V��]=��G�y�v�N�p�}�.>s�a	�3�w҄��2����J�����T#���s��Mei#�E��n ����Qdf��9�ԳN�b��Ǹ�j���zO�\\��T���;���el`\'��a�Osh���lg�Z��+c�>m��b�I�I�ué��<Kqd�k��I�G�������j=�ƙ.�/$��s$c���w,�����#p���A�ƌ�&yN�Wg"y����Tw��s��/廔�������)����\'������z(��F����V�|�6�
��]�Iv�;��#,m�U1�#��E�4�a�c�(7���s��-�zToq0�$�;9 ޴��m�k�D��ȬŶ�sɦ�����%�v-�67�1Y�Y��7����c`�l�v�	��K��_�s���i�4@��l���ַ�L���n1F*�8n;d���=������u��-M�v��o�ÞO�Ye��k{;��c��`���=M4Xk,t�����`�t��xt8/���7�"@ij1# ���z�������;.�O�&�[����1:���r�3����\\
~�\'1<Z~��B�"H�㞣�N���?�L��!c�G�EW2h%��X��@"�{EH�<)��/n� խ�K�(�`B5�T�ZV�CP������i���d�=��ɚ |�x�����X3�>���#WU=R	�� ����U;]~���"�ٮ�E�;��C0.:��t���Q���
�p�~dD;9�c�#�z��5Oo��5q��41�)Z���`_$����ީ#Z-퓪�!]�wwc���P�/vI����y&%�B��S����zBo�<�\'.9�>�R��ؔ�G���Ԏ6��Һ��F������,CE!���4���)((4��8�@�4��&(��ޖ�
h����@��
р����Eye9�[�9e����)�&�4����;	e���������̳Y�#!v���ߎ�_P��)�ʖ����L�pO��-���v�Wr�f۱p�
(�X���\\][�́�r1U#Ҧ�D	x��6v�c9��JW��7��fۑ遊��K�+ktѼY�nU�9�Qp�-���C�.;M������*���&Cє�҆�4���Eh�3#ڟ���QV�����.ѐC+�U#���U4uq!���H���j��
�%�r}�ql[���担���q|��gm���s���Ou���+<sKo&ݍ��nZ.}�n�dŻ��O��桗���#��N�1�"��x�`�F�����M�YJ��+>�B���"I�8���*�)\\m\\�}�i�����H�}��Ԋ�kj��UF�\\�V2�/#b����2[D�\\*�I@}qҋ��]X�s42�I	ʲ�~�t�e�{]��rI\\�����a�Z]�ë�eu]���$z�oV�,P�DQŠ.-��.b]�F.�=ME&�k/�� �~<����J.o�Y�J$�H8ݸ���qi1N%��C��rp��(�!nt��L�[�9��#?���akqn�K
�i�W�(� ���+so*"l�}~�#A@ad=�v��(��G%���,B�����4�+pVѮ08�#ދ��M>�Y�k9�����5�ڔmP=�ad0Y$ֱE|�;��b;Ԣ���\'�6c�Qp��{8-C}����
m���[�ݽً�y�Z.5�7Ē�r���?-�C���I�����@���3c͉$��r��~� 
�ӎ�)���1))�w����%!�I@y���J%!��"�%��!h�L��)~�R�kM8Vu��h�h���U�\\�+�FdwUORx�)�7���;��Hn����*9^�XP���/��F����4Y��8��-/4��3H�S�K�R���R�R�����E-%��j�&h�&y�P�h=((������%\'JJ)(8���RSPRR)1L����JCH}���hZp�R������ր9��Wμ�dW(��m�?a���[\\�ܨ!�Ъ���5}+��m
�D{��7�z���!t�SD(>�D9�|S~�l��@��o�Ќw��B��e�mQ�!_)N������uP��ʎ��=
J8���ڔ8ir��H��4{�h�)s@��jQҎ(;��@	��ۭAA����9<PE\'zL�����;P0�4
!��I@��J@i�PM M�C�m���@	I@\'��!��	F=h�ҨB���K@ZQր�)E+�ak<�Y`F__�C&����<q�l���"�d��������t\\p>�Egm&8I]��ҕ�am��ٌ��TQ��r�c�5s�AFh�X�#D,UUKrHɧ��H\'ޕh�Ҋ�@�@>��^isH��O4���E-��@�\'�~4@i(�I@ӥ\'nh�i(
(��%%\'RJJ`P)��
0�@!�����`x���4}i���i(AKT!iif������P�(g�Z(�K�jC
Ph�=h��PM��h�.if�<S��������R�֌�@&x�4�ZLќ�f��t��
L�q@���hL��J;R
7���PQL�IH��Gz`!���C@	ސ�6���5B�)sHu��sڊ(�������3ڀrp*QҐ��⁉Fh���4b�i����ZJ@-��dRP�8��>�f��Hh�(��>�CӚ3@	GJCE!��@jmPRS(�{�R);�
ހ��	M>���/�Fj�/֊Z(����4��.bk�-ԟ1$c��]Dn���*�<v�`�>��4��Ha��S��P!7��(�=
��-��@Q��r�0��q�H	w)�ix4��2MVK����;���"��I�#?ZP��x����@
8�(�@4gҐ4��3I����	�h���������4)(4
(<PM���S
%!�RPu��4C�CI@	I@4�JN��\'֐��	)E1
h���
(��QFi� �:���h��&@�Fx5;���5�[�z�?�5"��K�7iQ+v��~=3R�����7�g��ͳ�g�"9����1L�S�R��	���ޔҾ�\\d��9��\'�J�0o������B���g�=�<��.|͜-�
#-�}�I ��3\'pnؠ�&f�{*K~Q�`q��L[jh�t3
>r��so��7d���A5��o�n��������R���&��rV	�"B3���j����S�0�H��$)�L����l7�
�F����b	2ni;�����F�����?1���t�˒���Q�O���=���P֔R~4Q�`�� �A�����)gf��Lf�43�E�\'zL�j`�=(�PIڀ
(�&�֛@ZC@i
%!�BRPi� ��*�������Pj�t� ��O��, �i%u$ț�jw��G�ɖfh�(Y�ڭ�������>�\\Qƙo<�BdB�8F��\\�4�5�0T`E�b���n\\2���ɼ�R{�WV%�\'%6���
�Hi�����$D�GJki����@����O__jW	�kH�2�h×bŇ���i�ֲy�!݌�[�f��Ț��+����:�ǡ��b����]�I\'#�4]��dz5�m"U�),I�jm����I{p��/�S��SE�b�A��*$��޸�RjC4}hR�����(�G�H���}i�Qڐ>���(� �t�
:P(v�8��CLBR��@!���
(��PRf�HzPRP!)��
JJC@v��B�@�E "���P)�Ҁ���{P�
���}is�(�4:ҊP1i3@ޏ�/�&E.h��3�N�S��;Rt��(4Gց���A�Jc
Biw��I��4})(�(��֊BE&}h	�Ͻ!��@\'j\'z
7�E0ڊb��KHR����Q@
-(�)E�����/Z/���A�P
(��;њ(����I@jJZ)�R
@-&i�I�i(�!�IL8�9��4Q�)(�4RPR����AI@��;R����ƔU)h��������J-(���-/Z:R��PҊQ���~��PK@h�J(��I@�);t���hi}))�QH�
)4�JB:@\'z)�v��PFh;���Q�`!�Fh��%i4v�����4}-P��@�@
)E-- �4���M�����NZ3� 4���f�P1A�4QҀ�Q�h�R�w�4Q@�4g4Q@��%L�0��\'zC�
L�PI@������Rb�4P!
%y��%��J(3IL��E1Җ�
Q@zZ^Ԣ�!��J:�������)��h�HA҂hf�@Fy��3E�-%Q@A���Kހ<њ)(�����04�R}h�4i3@���f�i	�BI�`�� ��Pf��L�� �J`>����(��QHڎ�Q@��(��QK�)E!F(v��w�\\�Ҁ��
;�@/j)�/z(3A8���ڌ��t�����(�I�h���
By���OzL�Ғ��M4��(sHh��@%�J`%%���^����y���%���@E4�R�#J@.h�SzP8�IҀ>�f�
(Q�Z(����@i
zP�LџZO�Q�h�%
Cր>�P�G�!�4J>���3HM�J^���	���	�)����4��	){SR�Z(A�P�Ҍ��
Q@
9��t�aK@t���Fhi)�t����=��4{�Ҁ
9����4f�ޓ9���ʂ}(3�A�4Ҁ�I�j)(R}h��RP�J!4��8�4f��J)(<Q�CӚ&h�I@�!iE��KH4�P(�PњQҔP�(4J\\PҌ�
;Rv�h�����\\њJ3@�3E��ўh�&}(Q@i(E���MJL�C@i	��zPڐ�Q@i;SZ(
����MK@�!h�R�Z(izv�P)�ʊSJ:P1G�-���Z:Rf�
3@��Pߚ;�E-R(���֊(�4PM����4��4��=(�
(ZL��N����њCHi����%&(4zPh�@zC@	E%!�&�.i��
)G�}h�v��E 
\\�
恎����4}h<�P��E(��@N�f�
:P��PI@- 4��Bh�0�Rw��&i
3L4��	��h��� �@!4���%%ZCE%&h�%�Rg�L�f���@�֘ޖ����9��(�H�j3@z��:���@�4��@�Q@�4���I�Z^�}i>��){�)qH��

�3�((��w��@h&��RS��lQ�)3@&i���HM�����
&y��<P:�P \'4�J(��T���L�������G�$_���6�
�FG:�/�~�����������)�H9��A�����Co��/?������(�s��!�����!��P|C�����Co�� �A�	��?_�
��/�~����x��	��?_�
��H������m�rH9��ZW���7�
_�H������o�rH9�i_������)�#ҿ���!��Q� �B��?������(���I�������G$�����J�������K�	&��?_�
�ŽI<C�]\'���C����H�������G$��!�	&��?�
�“�M\'�~�����x��$�N?���!��Q�	&����!��Q� �i?������)�$����!��Q� ��I�����C��]\'�~��������I4�����o��I�����C�A����I�������G�$�O����7�
\\�x��	&��?�
��I4�����C�� 爿��?������(���I�������K�A����I�w����)?�$����!��Q� ��I�����C��M\'�~��������I4�����o��I�����C�A�?�$ҳ�|�7�
_�I4����!��Q� 爇�zO����7�
�������o�rH9���?������(���I�������O�A�?�#ҿ���!��Q�	��?_�
�ŽI<C�=+�~�����zW���7�
\\����H������o��_������(�s�?�#ҿ���!��Q�	��?_�
�ŽI<D���J��}�7�
C�-+�~���>I<C�-/�~����\'�$:W���7�
9$��Ht�����m��C�����Co�A�?�!�����!��Q�	��?_�
�ŽI<D> ��]�6�
?� �?���!��Q�.�΃�K�������I�	��??�
�ŽIvx��$g����6�
O��3�~���t��g����6�
?������Co�A΄���?���!��R{M��|��6�
9$�������8��I�������8��G$�΃�wM����q�“�wN����q�ŽI:8�+��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��ٟ�����G�$�O����7�
\\�x��	&��?�
��I4�����C�� 爿��?������(���I�������K�A����I�w����)?�$����!��Q� ��I�����C��M\'�~��������I4�����o��I�����C�A�?�$ҳ�|�7�
_�I4����!��Q� 爇�zO����7�
�������o�rH9���?������(���I�������O�A�?�#ҿ���!��Q�	��?_�
�ŽI<C�=+�~�����zW���7�
\\����H������o��_������(�s�?�#ҿ���!��Q�	��?_�
�ŽI<D���J��}�7�
C�-+�~���>I<C�-/�~����\'�$:W���7�
9$��Ht�����m��C�����Co�A�?�!�����!��Q�	��?_��
(��
(��
(��
(��
(��
(��
(��
(��
(��
(��
(��
(��
(��
(��
(��
(��
(��?����(�s�?�%����!��Q�	.��?�
�Ÿ$�<C�]\'�~�����i�������K�A��%�?���!��Q�	.��?�
�ŽI<C�]#�~����\'�$�G����7�
=���!�	.��?�
��It�����o�rK�s�?�$����!��R�?������(�s�?�$����!��Q�	&��?�
�ŽI<C�M\'�~����\'�$zN?���!��Q� ��I���>����/�$�O���7�
9$��=\'�~�����i?������(�s�?�#����!��R�\'���C�A��#����!��R�G����C�� ��G����C�>"ҿ���!��Q� ��E�v���m���i����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������');
        $this->assertEqual($entry->getText(), '55296 bytes unknown MakerNote data');
        $entry = $ifd0_0->getEntry(40960);
        // FlashPixVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'FlashPix Version 1.0');
        $entry = $ifd0_0->getEntry(40961);
        // ColorSpace
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 65535);
        $this->assertEqual($entry->getText(), 'Uncalibrated');
        $entry = $ifd0_0->getEntry(40962);
        // PixelXDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 1536);
        $this->assertEqual($entry->getText(), '1536');
        $entry = $ifd0_0->getEntry(40963);
        // PixelYDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 1024);
        $this->assertEqual($entry->getText(), '1024');
        $entry = $ifd0_0->getEntry(41495);
        // SensingMethod
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'One-chip color area sensor');
        $entry = $ifd0_0->getEntry(41728);
        // FileSource
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'DSC');
        $entry = $ifd0_0->getEntry(41729);
        // SceneType
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'Directly photographed');
        $entry = $ifd0_0->getEntry(41985);
    function testRead()
    {
        Pel::clearExceptions();
        Pel::setStrictParsing(false);
        $jpeg = new PelJpeg(dirname(__FILE__) . '/olympus-c5050z.jpg');
        $exif = $jpeg->getExif();
        $this->assertIsA($exif, 'PelExif');
        $tiff = $exif->getTiff();
        $this->assertIsA($tiff, 'PelTiff');
        /* The first IFD. */
        $ifd0 = $tiff->getIfd();
        $this->assertIsA($ifd0, 'PelIfd');
        /* Start of IDF $ifd0. */
        $this->assertEqual(count($ifd0->getEntries()), 11);
        $entry = $ifd0->getEntry(270);
        // ImageDescription
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'OLYMPUS DIGITAL CAMERA         ');
        $this->assertEqual($entry->getText(), 'OLYMPUS DIGITAL CAMERA         ');
        $entry = $ifd0->getEntry(271);
        // Make
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'OLYMPUS OPTICAL CO.,LTD');
        $this->assertEqual($entry->getText(), 'OLYMPUS OPTICAL CO.,LTD');
        $entry = $ifd0->getEntry(272);
        // Model
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'C5050Z');
        $this->assertEqual($entry->getText(), 'C5050Z');
        $entry = $ifd0->getEntry(274);
        // Orientation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'top - left');
        $entry = $ifd0->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd0->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd0->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        $entry = $ifd0->getEntry(305);
        // Software
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'v558-83');
        $this->assertEqual($entry->getText(), 'v558-83');
        $entry = $ifd0->getEntry(306);
        // DateTime
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), false);
        $this->assertEqual($entry->getText(), '0000:00:00 00:00:00');
        $entry = $ifd0->getEntry(531);
        // YCbCrPositioning
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'co-sited');
        $entry = $ifd0->getEntry(50341);
        // PrintIM
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), 'PrintIM0250�	
�
�����������	\'\'�\'�\'\'^\'�\'�\'�\'');
        $this->assertEqual($entry->getText(), '(undefined)');
        /* Sub IFDs of $ifd0. */
        $this->assertEqual(count($ifd0->getSubIfds()), 1);
        $ifd0_0 = $ifd0->getSubIfd(2);
        // IFD Exif
        $this->assertIsA($ifd0_0, 'PelIfd');
        /* Start of IDF $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getEntries()), 32);
        $entry = $ifd0_0->getEntry(33434);
        // ExposureTime
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 10, 1 => 40));
        $this->assertEqual($entry->getText(), '1/4 sec.');
        $entry = $ifd0_0->getEntry(33437);
        // FNumber
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 26, 1 => 10));
        $this->assertEqual($entry->getText(), 'f/2.6');
        $entry = $ifd0_0->getEntry(34850);
        // ExposureProgram
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Normal program');
        $entry = $ifd0_0->getEntry(34855);
        // ISOSpeedRatings
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 64);
        $this->assertEqual($entry->getText(), '64');
        $entry = $ifd0_0->getEntry(36864);
        // ExifVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 2.2);
        $this->assertEqual($entry->getText(), 'Exif Version 2.2');
        $entry = $ifd0_0->getEntry(36867);
        // DateTimeOriginal
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), false);
        $this->assertEqual($entry->getText(), '0000:00:00 00:00:00');
        $entry = $ifd0_0->getEntry(36868);
        // DateTimeDigitized
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), false);
        $this->assertEqual($entry->getText(), '0000:00:00 00:00:00');
        $entry = $ifd0_0->getEntry(37121);
        // ComponentsConfiguration
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'Y Cb Cr -');
        $entry = $ifd0_0->getEntry(37122);
        // CompressedBitsPerPixel
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 2, 1 => 1));
        $this->assertEqual($entry->getText(), '2/1');
        $entry = $ifd0_0->getEntry(37380);
        // ExposureBiasValue
        $this->assertIsA($entry, 'PelEntrySRational');
        $this->assertEqual($entry->getValue(), array(0 => 0, 1 => 10));
        $this->assertEqual($entry->getText(), '0.0');
        $entry = $ifd0_0->getEntry(37381);
        // MaxApertureValue
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 28, 1 => 10));
        $this->assertEqual($entry->getText(), '28/10');
        $entry = $ifd0_0->getEntry(37383);
        // MeteringMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 5);
        $this->assertEqual($entry->getText(), 'Pattern');
        $entry = $ifd0_0->getEntry(37384);
        // LightSource
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Unknown');
        $entry = $ifd0_0->getEntry(37385);
        // Flash
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 16);
        $this->assertEqual($entry->getText(), 'Flash did not fire, compulsory flash mode.');
        $entry = $ifd0_0->getEntry(37386);
        // FocalLength
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 213, 1 => 10));
        $this->assertEqual($entry->getText(), '21.3 mm');
        $entry = $ifd0_0->getEntry(37500);
        // MakerNote
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), 'OLYMP�����4	 B�bdd�d
8ISX558[pictureInfo] Resolution=1 [Camera Info] Type=SX558OLYMPUS DIGITAL CAMERA���������1��H���UU�1������J@gg�I˦��������������������a1v?�Y�0�
��n��r�[R	2
H�dx
2B@d* ');
        $this->assertEqual($entry->getText(), '600 bytes unknown MakerNote data');
        $entry = $ifd0_0->getEntry(37510);
        // UserComment
        $this->assertIsA($entry, 'PelEntryUserComment');
        $this->assertEqual($entry->getValue(), '                                                                                                                     ');
        $this->assertEqual($entry->getText(), '                                                                                                                     ');
        $entry = $ifd0_0->getEntry(40960);
        // FlashPixVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'FlashPix Version 1.0');
        $entry = $ifd0_0->getEntry(40961);
        // ColorSpace
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'sRGB');
        $entry = $ifd0_0->getEntry(40962);
        // PixelXDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 640);
        $this->assertEqual($entry->getText(), '640');
        $entry = $ifd0_0->getEntry(40963);
        // PixelYDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 480);
        $this->assertEqual($entry->getText(), '480');
        $entry = $ifd0_0->getEntry(41728);
        // FileSource
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'DSC');
        $entry = $ifd0_0->getEntry(41729);
        // SceneType
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'Directly photographed');
        $entry = $ifd0_0->getEntry(41985);
        // CustomRendered
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal process');
        $entry = $ifd0_0->getEntry(41986);
        // ExposureMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Auto exposure');
        $entry = $ifd0_0->getEntry(41987);
        // WhiteBalance
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'Manual white balance');
        $entry = $ifd0_0->getEntry(41988);
        // DigitalZoomRatio
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 0, 1 => 100));
        $this->assertEqual($entry->getText(), '0/100');
        $entry = $ifd0_0->getEntry(41990);
        // SceneCaptureType
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Standard');
        $entry = $ifd0_0->getEntry(41991);
        // GainControl
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41992);
        // Contrast
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41993);
        // Saturation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41994);
        // Sharpness
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        /* Sub IFDs of $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getSubIfds()), 1);
        $ifd0_0_0 = $ifd0_0->getSubIfd(4);
        // IFD Interoperability
        $this->assertIsA($ifd0_0_0, 'PelIfd');
        /* Start of IDF $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getEntries()), 2);
        $entry = $ifd0_0_0->getEntry(1);
        // InteroperabilityIndex
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'R98');
        $this->assertEqual($entry->getText(), 'R98');
        $entry = $ifd0_0_0->getEntry(2);
        // InteroperabilityVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'Interoperability Version 1.0');
        /* Sub IFDs of $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getSubIfds()), 0);
        $this->assertEqual($ifd0_0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_0_1 = $ifd0_0_0->getNextIfd();
        $this->assertNull($ifd0_0_1);
        /* End of IFD $ifd0_0_0. */
        $this->assertEqual($ifd0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_1 = $ifd0_0->getNextIfd();
        $this->assertNull($ifd0_1);
        /* End of IFD $ifd0_0. */
        $this->assertEqual($ifd0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd1 = $ifd0->getNextIfd();
        $this->assertIsA($ifd1, 'PelIfd');
        /* End of IFD $ifd0. */
        /* Start of IDF $ifd1. */
        $this->assertEqual(count($ifd1->getEntries()), 4);
        $entry = $ifd1->getEntry(259);
        // Compression
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 6);
        $this->assertEqual($entry->getText(), 'JPEG compression');
        $entry = $ifd1->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        /* Sub IFDs of $ifd1. */
        $this->assertEqual(count($ifd1->getSubIfds()), 0);
        $thumb_data = file_get_contents(dirname(__FILE__) . '/olympus-c5050z-thumb.jpg');
        $this->assertEqual($ifd1->getThumbnailData(), $thumb_data);
        /* Next IFD. */
        $ifd2 = $ifd1->getNextIfd();
        $this->assertNull($ifd2);
Esempio n. 17
0
    function testRead()
    {
        Pel::clearExceptions();
        Pel::setStrictParsing(false);
        $jpeg = new PelJpeg(dirname(__FILE__) . '/olympus-c765uz.jpg');
        $exif = $jpeg->getExif();
        $this->assertIsA($exif, 'PelExif');
        $tiff = $exif->getTiff();
        $this->assertIsA($tiff, 'PelTiff');
        /* The first IFD. */
        $ifd0 = $tiff->getIfd();
        $this->assertIsA($ifd0, 'PelIfd');
        /* Start of IDF $ifd0. */
        $this->assertEqual(count($ifd0->getEntries()), 11);
        $entry = $ifd0->getEntry(270);
        // ImageDescription
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'OLYMPUS DIGITAL CAMERA         ');
        $this->assertEqual($entry->getText(), 'OLYMPUS DIGITAL CAMERA         ');
        $entry = $ifd0->getEntry(271);
        // Make
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'OLYMPUS CORPORATION');
        $this->assertEqual($entry->getText(), 'OLYMPUS CORPORATION');
        $entry = $ifd0->getEntry(272);
        // Model
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'C765UZ');
        $this->assertEqual($entry->getText(), 'C765UZ');
        $entry = $ifd0->getEntry(274);
        // Orientation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'top - left');
        $entry = $ifd0->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd0->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd0->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        $entry = $ifd0->getEntry(305);
        // Software
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'v777-76');
        $this->assertEqual($entry->getText(), 'v777-76');
        $entry = $ifd0->getEntry(306);
        // DateTime
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1090073972);
        $this->assertEqual($entry->getText(), '2004:07:17 14:19:32');
        $entry = $ifd0->getEntry(531);
        // YCbCrPositioning
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'co-sited');
        $entry = $ifd0->getEntry(50341);
        // PrintIM
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), 'PrintIM' . "" . '0250' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'ˆ' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '	' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'а' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'ш' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'џ' . "" . '' . "" . '' . "" . '€' . "" . '' . "" . '' . "" . '€' . "" . '' . "" . '' . "" . '€' . "" . '' . "" . '' . "" . '€' . "" . '' . "" . '' . "" . '€' . "" . '' . "" . '' . "" . '€€€' . "" . '€' . "" . '' . "" . '' . "" . '	' . "" . '' . "" . '\'' . "" . '' . "" . '' . "" . '' . "" . '\'' . "" . '' . "" . '—' . "" . '' . "" . '\'' . "" . '' . "" . 'А' . "" . '' . "" . '\'' . "" . '' . "" . '' . "" . '' . "" . '\'' . "" . '' . "" . '^' . "" . '' . "" . '\'' . "" . '' . "" . '‹' . "" . '' . "" . '' . "" . '\'' . "" . '' . "" . 'Ы' . "" . '' . "" . '\'' . "" . '' . "" . 'х' . "" . '' . "" . '\'' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '!' . "" . 'š‚' . "" . '' . "" . '' . "" . '' . "" . 'И' . "" . '' . "" . '‚');
        $this->assertEqual($entry->getText(), '(undefined)');
        /* Sub IFDs of $ifd0. */
        $this->assertEqual(count($ifd0->getSubIfds()), 1);
        $ifd0_0 = $ifd0->getSubIfd(2);
        // IFD Exif
        $this->assertIsA($ifd0_0, 'PelIfd');
        /* Start of IDF $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getEntries()), 32);
        $entry = $ifd0_0->getEntry(33434);
        // ExposureTime
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 10, 1 => 2000));
        $this->assertEqual($entry->getText(), '1/200 sec.');
        $entry = $ifd0_0->getEntry(33437);
        // FNumber
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 32, 1 => 10));
        $this->assertEqual($entry->getText(), 'f/3.2');
        $entry = $ifd0_0->getEntry(34850);
        // ExposureProgram
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 5);
        $this->assertEqual($entry->getText(), 'Creative program (biased toward depth of field)');
        $entry = $ifd0_0->getEntry(34855);
        // ISOSpeedRatings
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 64);
        $this->assertEqual($entry->getText(), '64');
        $entry = $ifd0_0->getEntry(36864);
        // ExifVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 2.2);
        $this->assertEqual($entry->getText(), 'Exif Version 2.2');
        $entry = $ifd0_0->getEntry(36867);
        // DateTimeOriginal
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1090073972);
        $this->assertEqual($entry->getText(), '2004:07:17 14:19:32');
        $entry = $ifd0_0->getEntry(36868);
        // DateTimeDigitized
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1090073972);
        $this->assertEqual($entry->getText(), '2004:07:17 14:19:32');
        $entry = $ifd0_0->getEntry(37121);
        // ComponentsConfiguration
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '' . "" . '');
        $this->assertEqual($entry->getText(), 'Y Cb Cr -');
        $entry = $ifd0_0->getEntry(37122);
        // CompressedBitsPerPixel
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 2, 1 => 1));
        $this->assertEqual($entry->getText(), '2/1');
        $entry = $ifd0_0->getEntry(37380);
        // ExposureBiasValue
        $this->assertIsA($entry, 'PelEntrySRational');
        $this->assertEqual($entry->getValue(), array(0 => 0, 1 => 10));
        $this->assertEqual($entry->getText(), '0.0');
        $entry = $ifd0_0->getEntry(37381);
        // MaxApertureValue
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 34, 1 => 10));
        $this->assertEqual($entry->getText(), '34/10');
        $entry = $ifd0_0->getEntry(37383);
        // MeteringMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 5);
        $this->assertEqual($entry->getText(), 'Pattern');
        $entry = $ifd0_0->getEntry(37384);
        // LightSource
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Unknown');
        $entry = $ifd0_0->getEntry(37385);
        // Flash
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 16);
        $this->assertEqual($entry->getText(), 'Flash did not fire, compulsory flash mode.');
        $entry = $ifd0_0->getEntry(37386);
        // FocalLength
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 109, 1 => 10));
        $this->assertEqual($entry->getText(), '10.9 mm');
        $entry = $ifd0_0->getEntry(37500);
        // MakerNote
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), 'OLYMP' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'р' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'ь' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'є' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'ќ' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '4' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '	' . "" . ' ' . "" . '' . "" . '' . "" . 'L' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'ю' . "" . '' . "" . 'l' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'd' . "" . '' . "" . '' . "" . 'd' . "" . '' . "" . '' . "" . 'њ' . "" . '' . "" . 'ш' . "" . '' . "" . 'џџдўжџНџНџSX777' . "" . '' . "" . '' . "" . '[pictureInfo] Resolution=1 [Camera Info] Type=SX777' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'OLYMPUS DIGITAL CAMERA' . "" . 'џџџџџџџџџ4Ÿ' . "" . '' . "" . '' . "" . '' . "" . 'џ' . "" . '' . "" . 'a1' . "" . '' . "" . 'у' . "" . '' . "" . ' ' . "" . '' . "" . 'ќ' . "" . '' . "" . '№' . "" . '' . "" . '№' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'd' . "" . 'Ч' . "" . '@' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '*’' . "" . '' . "" . '' . "" . '' . "" . '*.' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '<' . "" . 'J' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'dќ' . "" . '' . "" . '' . "" . '' . "" . '""""""""""""""""""""Є~ы|Ё' . "" . '№Y' . "" . 'R' . "" . '' . "" . '
' . "" . '' . "" . '
' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'ЧoРh4Ÿ' . "" . '' . "" . '/
с' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'ˆˆ' . "" . '' . "" . 'эк' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '@' . "" . 'ИN' . "" . '	Dsода' . "" . '' . "" . 'э' . "" . '' . "" . '' . "" . 'DќSH	СV' . "" . '' . "" . '
„Ь7h8' . "" . '' . "" . 'џ’	)?&' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'Ї$уъз' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'wwww\'
' . "" . 'с' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'i' . "" . 'OvY' . "" . '$7' . "" . ')*ћƒю2' . "" . '' . "" . '
' . "" . '6' . "" . 'nЁ$* R' . "" . '' . "" . '
n_' . "" . '');
        $this->assertEqual($entry->getText(), '840 bytes unknown MakerNote data');
        $entry = $ifd0_0->getEntry(37510);
        // UserComment
        $this->assertIsA($entry, 'PelEntryUserComment');
        $this->assertEqual($entry->getValue(), '                                                                                                                     ');
        $this->assertEqual($entry->getText(), '                                                                                                                     ');
        $entry = $ifd0_0->getEntry(40960);
        // FlashPixVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'FlashPix Version 1.0');
        $entry = $ifd0_0->getEntry(40961);
        // ColorSpace
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'sRGB');
        $entry = $ifd0_0->getEntry(40962);
        // PixelXDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 2288);
        $this->assertEqual($entry->getText(), '2288');
        $entry = $ifd0_0->getEntry(40963);
        // PixelYDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 1712);
        $this->assertEqual($entry->getText(), '1712');
        $entry = $ifd0_0->getEntry(41728);
        // FileSource
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'DSC');
        $entry = $ifd0_0->getEntry(41729);
        // SceneType
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'Directly photographed');
        $entry = $ifd0_0->getEntry(41985);
        // CustomRendered
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal process');
        $entry = $ifd0_0->getEntry(41986);
        // ExposureMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Auto exposure');
        $entry = $ifd0_0->getEntry(41987);
        // WhiteBalance
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Auto white balance');
        $entry = $ifd0_0->getEntry(41988);
        // DigitalZoomRatio
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 0, 1 => 100));
        $this->assertEqual($entry->getText(), '0/100');
        $entry = $ifd0_0->getEntry(41990);
        // SceneCaptureType
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Portrait');
        $entry = $ifd0_0->getEntry(41991);
        // GainControl
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41992);
        // Contrast
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41993);
        // Saturation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41994);
        // Sharpness
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        /* Sub IFDs of $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getSubIfds()), 1);
        $ifd0_0_0 = $ifd0_0->getSubIfd(4);
        // IFD Interoperability
        $this->assertIsA($ifd0_0_0, 'PelIfd');
        /* Start of IDF $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getEntries()), 2);
        $entry = $ifd0_0_0->getEntry(1);
        // InteroperabilityIndex
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'R98');
        $this->assertEqual($entry->getText(), 'R98');
        $entry = $ifd0_0_0->getEntry(2);
        // InteroperabilityVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'Interoperability Version 1.0');
        /* Sub IFDs of $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getSubIfds()), 0);
        $this->assertEqual($ifd0_0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_0_1 = $ifd0_0_0->getNextIfd();
        $this->assertNull($ifd0_0_1);
        /* End of IFD $ifd0_0_0. */
        $this->assertEqual($ifd0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_1 = $ifd0_0->getNextIfd();
        $this->assertNull($ifd0_1);
        /* End of IFD $ifd0_0. */
        $this->assertEqual($ifd0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd1 = $ifd0->getNextIfd();
        $this->assertIsA($ifd1, 'PelIfd');
        /* End of IFD $ifd0. */
        /* Start of IDF $ifd1. */
        $this->assertEqual(count($ifd1->getEntries()), 4);
        $entry = $ifd1->getEntry(259);
        // Compression
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 6);
        $this->assertEqual($entry->getText(), 'JPEG compression');
        $entry = $ifd1->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        /* Sub IFDs of $ifd1. */
        $this->assertEqual(count($ifd1->getSubIfds()), 0);
        $thumb_data = file_get_contents(dirname(__FILE__) . '/olympus-c765uz-thumb.jpg');
        $this->assertEqual($ifd1->getThumbnailData(), $thumb_data);
    function testRead()
    {
        Pel::clearExceptions();
        Pel::setStrictParsing(false);
        $jpeg = new PelJpeg(dirname(__FILE__) . '/olympus-c765uz.jpg');
        $exif = $jpeg->getExif();
        $this->assertIsA($exif, 'PelExif');
        $tiff = $exif->getTiff();
        $this->assertIsA($tiff, 'PelTiff');
        /* The first IFD. */
        $ifd0 = $tiff->getIfd();
        $this->assertIsA($ifd0, 'PelIfd');
        /* Start of IDF $ifd0. */
        $this->assertEqual(count($ifd0->getEntries()), 11);
        $entry = $ifd0->getEntry(270);
        // ImageDescription
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'OLYMPUS DIGITAL CAMERA         ');
        $this->assertEqual($entry->getText(), 'OLYMPUS DIGITAL CAMERA         ');
        $entry = $ifd0->getEntry(271);
        // Make
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'OLYMPUS CORPORATION');
        $this->assertEqual($entry->getText(), 'OLYMPUS CORPORATION');
        $entry = $ifd0->getEntry(272);
        // Model
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'C765UZ');
        $this->assertEqual($entry->getText(), 'C765UZ');
        $entry = $ifd0->getEntry(274);
        // Orientation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'top - left');
        $entry = $ifd0->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd0->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd0->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        $entry = $ifd0->getEntry(305);
        // Software
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'v777-76');
        $this->assertEqual($entry->getText(), 'v777-76');
        $entry = $ifd0->getEntry(306);
        // DateTime
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1090073972);
        $this->assertEqual($entry->getText(), '2004:07:17 14:19:32');
        $entry = $ifd0->getEntry(531);
        // YCbCrPositioning
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'co-sited');
        $entry = $ifd0->getEntry(50341);
        // PrintIM
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), 'PrintIM0250ˆ	
а
шџ€€€€€€€€€	\'\'—\'А\'\'^\'‹\'Ы\'х\'!š‚И‚');
        $this->assertEqual($entry->getText(), '(undefined)');
        /* Sub IFDs of $ifd0. */
        $this->assertEqual(count($ifd0->getSubIfds()), 1);
        $ifd0_0 = $ifd0->getSubIfd(2);
        // IFD Exif
        $this->assertIsA($ifd0_0, 'PelIfd');
        /* Start of IDF $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getEntries()), 32);
        $entry = $ifd0_0->getEntry(33434);
        // ExposureTime
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 10, 1 => 2000));
        $this->assertEqual($entry->getText(), '1/200 sec.');
        $entry = $ifd0_0->getEntry(33437);
        // FNumber
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 32, 1 => 10));
        $this->assertEqual($entry->getText(), 'f/3.2');
        $entry = $ifd0_0->getEntry(34850);
        // ExposureProgram
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 5);
        $this->assertEqual($entry->getText(), 'Creative program (biased toward depth of field)');
        $entry = $ifd0_0->getEntry(34855);
        // ISOSpeedRatings
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 64);
        $this->assertEqual($entry->getText(), '64');
        $entry = $ifd0_0->getEntry(36864);
        // ExifVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 2.2);
        $this->assertEqual($entry->getText(), 'Exif Version 2.2');
        $entry = $ifd0_0->getEntry(36867);
        // DateTimeOriginal
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1090073972);
        $this->assertEqual($entry->getText(), '2004:07:17 14:19:32');
        $entry = $ifd0_0->getEntry(36868);
        // DateTimeDigitized
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1090073972);
        $this->assertEqual($entry->getText(), '2004:07:17 14:19:32');
        $entry = $ifd0_0->getEntry(37121);
        // ComponentsConfiguration
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'Y Cb Cr -');
        $entry = $ifd0_0->getEntry(37122);
        // CompressedBitsPerPixel
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 2, 1 => 1));
        $this->assertEqual($entry->getText(), '2/1');
        $entry = $ifd0_0->getEntry(37380);
        // ExposureBiasValue
        $this->assertIsA($entry, 'PelEntrySRational');
        $this->assertEqual($entry->getValue(), array(0 => 0, 1 => 10));
        $this->assertEqual($entry->getText(), '0.0');
        $entry = $ifd0_0->getEntry(37381);
        // MaxApertureValue
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 34, 1 => 10));
        $this->assertEqual($entry->getText(), '34/10');
        $entry = $ifd0_0->getEntry(37383);
        // MeteringMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 5);
        $this->assertEqual($entry->getText(), 'Pattern');
        $entry = $ifd0_0->getEntry(37384);
        // LightSource
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Unknown');
        $entry = $ifd0_0->getEntry(37385);
        // Flash
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 16);
        $this->assertEqual($entry->getText(), 'Flash did not fire, compulsory flash mode.');
        $entry = $ifd0_0->getEntry(37386);
        // FocalLength
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 109, 1 => 10));
        $this->assertEqual($entry->getText(), '10.9 mm');
        $entry = $ifd0_0->getEntry(37500);
        // MakerNote
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), 'OLYMPрьєќ4	 LюlddњшџџдўжџНџНџSX777[pictureInfo] Resolution=1 [Camera Info] Type=SX777OLYMPUS DIGITAL CAMERAџџџџџџџџџ4Ÿџa1у ќ№№dЧ@*’*.<Jdќ""""""""""""""""""""Є~ы|Ё№YR


ЧoРh4Ÿ/
сˆˆэк@ИN	DsодаэDќSH	СV
„Ь7h8џ’	)?&Ї$уъзwwww\'
сiOvY$7)*ћƒю2
6nЁ$* R
n_');
        $this->assertEqual($entry->getText(), '840 bytes unknown MakerNote data');
        $entry = $ifd0_0->getEntry(37510);
        // UserComment
        $this->assertIsA($entry, 'PelEntryUserComment');
        $this->assertEqual($entry->getValue(), '                                                                                                                     ');
        $this->assertEqual($entry->getText(), '                                                                                                                     ');
        $entry = $ifd0_0->getEntry(40960);
        // FlashPixVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'FlashPix Version 1.0');
        $entry = $ifd0_0->getEntry(40961);
        // ColorSpace
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'sRGB');
        $entry = $ifd0_0->getEntry(40962);
        // PixelXDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 2288);
        $this->assertEqual($entry->getText(), '2288');
        $entry = $ifd0_0->getEntry(40963);
        // PixelYDimension
        $this->assertIsA($entry, 'PelEntryLong');
        $this->assertEqual($entry->getValue(), 1712);
        $this->assertEqual($entry->getText(), '1712');
        $entry = $ifd0_0->getEntry(41728);
        // FileSource
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'DSC');
        $entry = $ifd0_0->getEntry(41729);
        // SceneType
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'Directly photographed');
        $entry = $ifd0_0->getEntry(41985);
        // CustomRendered
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal process');
        $entry = $ifd0_0->getEntry(41986);
        // ExposureMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Auto exposure');
        $entry = $ifd0_0->getEntry(41987);
        // WhiteBalance
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Auto white balance');
        $entry = $ifd0_0->getEntry(41988);
        // DigitalZoomRatio
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 0, 1 => 100));
        $this->assertEqual($entry->getText(), '0/100');
        $entry = $ifd0_0->getEntry(41990);
        // SceneCaptureType
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Portrait');
        $entry = $ifd0_0->getEntry(41991);
        // GainControl
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41992);
        // Contrast
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41993);
        // Saturation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41994);
        // Sharpness
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        /* Sub IFDs of $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getSubIfds()), 1);
        $ifd0_0_0 = $ifd0_0->getSubIfd(4);
        // IFD Interoperability
        $this->assertIsA($ifd0_0_0, 'PelIfd');
        /* Start of IDF $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getEntries()), 2);
        $entry = $ifd0_0_0->getEntry(1);
        // InteroperabilityIndex
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'R98');
        $this->assertEqual($entry->getText(), 'R98');
        $entry = $ifd0_0_0->getEntry(2);
        // InteroperabilityVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'Interoperability Version 1.0');
        /* Sub IFDs of $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getSubIfds()), 0);
        $this->assertEqual($ifd0_0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_0_1 = $ifd0_0_0->getNextIfd();
        $this->assertNull($ifd0_0_1);
        /* End of IFD $ifd0_0_0. */
        $this->assertEqual($ifd0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_1 = $ifd0_0->getNextIfd();
        $this->assertNull($ifd0_1);
        /* End of IFD $ifd0_0. */
        $this->assertEqual($ifd0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd1 = $ifd0->getNextIfd();
        $this->assertIsA($ifd1, 'PelIfd');
        /* End of IFD $ifd0. */
        /* Start of IDF $ifd1. */
        $this->assertEqual(count($ifd1->getEntries()), 4);
        $entry = $ifd1->getEntry(259);
        // Compression
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 6);
        $this->assertEqual($entry->getText(), 'JPEG compression');
        $entry = $ifd1->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        /* Sub IFDs of $ifd1. */
        $this->assertEqual(count($ifd1->getSubIfds()), 0);
        $thumb_data = file_get_contents(dirname(__FILE__) . '/olympus-c765uz-thumb.jpg');
        $this->assertEqual($ifd1->getThumbnailData(), $thumb_data);
Esempio n. 19
0
    function testRead()
    {
        Pel::clearExceptions();
        Pel::setStrictParsing(false);
        $jpeg = new PelJpeg(dirname(__FILE__) . '/canon-ixus-ii.jpg');
        $exif = $jpeg->getExif();
        $this->assertIsA($exif, 'PelExif');
        $tiff = $exif->getTiff();
        $this->assertIsA($tiff, 'PelTiff');
        /* The first IFD. */
        $ifd0 = $tiff->getIfd();
        $this->assertIsA($ifd0, 'PelIfd');
        /* Start of IDF $ifd0. */
        $this->assertEqual(count($ifd0->getEntries()), 8);
        $entry = $ifd0->getEntry(271);
        // Make
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'Canon');
        $this->assertEqual($entry->getText(), 'Canon');
        $entry = $ifd0->getEntry(272);
        // Model
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'Canon DIGITAL IXUS II');
        $this->assertEqual($entry->getText(), 'Canon DIGITAL IXUS II');
        $entry = $ifd0->getEntry(274);
        // Orientation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 6);
        $this->assertEqual($entry->getText(), 'right - top');
        $entry = $ifd0->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 180, 1 => 1));
        $this->assertEqual($entry->getText(), '180/1');
        $entry = $ifd0->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 180, 1 => 1));
        $this->assertEqual($entry->getText(), '180/1');
        $entry = $ifd0->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        $entry = $ifd0->getEntry(306);
        // DateTime
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1089488628);
        $this->assertEqual($entry->getText(), '2004:07:10 19:43:48');
        $entry = $ifd0->getEntry(531);
        // YCbCrPositioning
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'centered');
        /* Sub IFDs of $ifd0. */
        $this->assertEqual(count($ifd0->getSubIfds()), 1);
        $ifd0_0 = $ifd0->getSubIfd(2);
        // IFD Exif
        $this->assertIsA($ifd0_0, 'PelIfd');
        /* Start of IDF $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getEntries()), 30);
        $entry = $ifd0_0->getEntry(33434);
        // ExposureTime
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 1, 1 => 30));
        $this->assertEqual($entry->getText(), '1/30 sec.');
        $entry = $ifd0_0->getEntry(33437);
        // FNumber
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 32, 1 => 10));
        $this->assertEqual($entry->getText(), 'f/3.2');
        $entry = $ifd0_0->getEntry(36864);
        // ExifVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 2.2);
        $this->assertEqual($entry->getText(), 'Exif Version 2.2');
        $entry = $ifd0_0->getEntry(36867);
        // DateTimeOriginal
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1089488628);
        $this->assertEqual($entry->getText(), '2004:07:10 19:43:48');
        $entry = $ifd0_0->getEntry(36868);
        // DateTimeDigitized
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), 1089488628);
        $this->assertEqual($entry->getText(), '2004:07:10 19:43:48');
        $entry = $ifd0_0->getEntry(37121);
        // ComponentsConfiguration
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'Y Cb Cr -');
        $entry = $ifd0_0->getEntry(37122);
        // CompressedBitsPerPixel
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 2, 1 => 1));
        $this->assertEqual($entry->getText(), '2/1');
        $entry = $ifd0_0->getEntry(37377);
        // ShutterSpeedValue
        $this->assertIsA($entry, 'PelEntrySRational');
        $this->assertEqual($entry->getValue(), array(0 => 157, 1 => 32));
        $this->assertEqual($entry->getText(), '157/32 sec. (APEX: 5)');
        $entry = $ifd0_0->getEntry(37378);
        // ApertureValue
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 107, 1 => 32));
        $this->assertEqual($entry->getText(), 'f/3.2');
        $entry = $ifd0_0->getEntry(37380);
        // ExposureBiasValue
        $this->assertIsA($entry, 'PelEntrySRational');
        $this->assertEqual($entry->getValue(), array(0 => -1, 1 => 3));
        $this->assertEqual($entry->getText(), '-0.3');
        $entry = $ifd0_0->getEntry(37381);
        // MaxApertureValue
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 107, 1 => 32));
        $this->assertEqual($entry->getText(), '107/32');
        $entry = $ifd0_0->getEntry(37383);
        // MeteringMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 5);
        $this->assertEqual($entry->getText(), 'Pattern');
        $entry = $ifd0_0->getEntry(37385);
        // Flash
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 16);
        $this->assertEqual($entry->getText(), 'Flash did not fire, compulsory flash mode.');
        $entry = $ifd0_0->getEntry(37386);
        // FocalLength
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 215, 1 => 32));
        $this->assertEqual($entry->getText(), '6.7 mm');
        $entry = $ifd0_0->getEntry(37500);
        // MakerNote
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '.\\��"� X `�|W	 �#
"�\\@��Z� j�������D��k���6j��+		��q*��r��r��r������000IMG:DIGITAL IXUS II JPEGFirmware Version 1.00D	���������@��
��
 m���l');
        $this->assertEqual($entry->getText(), '590 bytes unknown MakerNote data');
        $entry = $ifd0_0->getEntry(37510);
        // UserComment
        $this->assertIsA($entry, 'PelEntryUserComment');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), '');
        $entry = $ifd0_0->getEntry(40960);
        // FlashPixVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'FlashPix Version 1.0');
        $entry = $ifd0_0->getEntry(40961);
        // ColorSpace
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'sRGB');
        $entry = $ifd0_0->getEntry(40962);
        // PixelXDimension
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 640);
        $this->assertEqual($entry->getText(), '640');
        $entry = $ifd0_0->getEntry(40963);
        // PixelYDimension
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 480);
        $this->assertEqual($entry->getText(), '480');
        $entry = $ifd0_0->getEntry(41486);
        // FocalPlaneXResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 640000, 1 => 208));
        $this->assertEqual($entry->getText(), '640000/208');
        $entry = $ifd0_0->getEntry(41487);
        // FocalPlaneYResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 480000, 1 => 156));
        $this->assertEqual($entry->getText(), '480000/156');
        $entry = $ifd0_0->getEntry(41488);
        // FocalPlaneResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        $entry = $ifd0_0->getEntry(41495);
        // SensingMethod
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'One-chip color area sensor');
        $entry = $ifd0_0->getEntry(41728);
        // FileSource
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'DSC');
        $entry = $ifd0_0->getEntry(41985);
        // CustomRendered
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal process');
        $entry = $ifd0_0->getEntry(41986);
        // ExposureMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'Manual exposure');
        $entry = $ifd0_0->getEntry(41987);
        // WhiteBalance
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'Manual white balance');
        $entry = $ifd0_0->getEntry(41988);
        // DigitalZoomRatio
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 2048, 1 => 2048));
        $this->assertEqual($entry->getText(), '2048/2048');
        $entry = $ifd0_0->getEntry(41990);
        // SceneCaptureType
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Standard');
        /* Sub IFDs of $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getSubIfds()), 1);
        $ifd0_0_0 = $ifd0_0->getSubIfd(4);
        // IFD Interoperability
        $this->assertIsA($ifd0_0_0, 'PelIfd');
        /* Start of IDF $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getEntries()), 4);
        $entry = $ifd0_0_0->getEntry(1);
        // InteroperabilityIndex
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'R98');
        $this->assertEqual($entry->getText(), 'R98');
        $entry = $ifd0_0_0->getEntry(2);
        // InteroperabilityVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'Interoperability Version 1.0');
        $entry = $ifd0_0_0->getEntry(4097);
        // RelatedImageWidth
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 640);
        $this->assertEqual($entry->getText(), '640');
        $entry = $ifd0_0_0->getEntry(4098);
        // RelatedImageLength
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 480);
        $this->assertEqual($entry->getText(), '480');
        /* Sub IFDs of $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getSubIfds()), 0);
        $this->assertEqual($ifd0_0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_0_1 = $ifd0_0_0->getNextIfd();
        $this->assertNull($ifd0_0_1);
        /* End of IFD $ifd0_0_0. */
        $this->assertEqual($ifd0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_1 = $ifd0_0->getNextIfd();
        $this->assertNull($ifd0_1);
        /* End of IFD $ifd0_0. */
        $this->assertEqual($ifd0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd1 = $ifd0->getNextIfd();
        $this->assertIsA($ifd1, 'PelIfd');
        /* End of IFD $ifd0. */
        /* Start of IDF $ifd1. */
        $this->assertEqual(count($ifd1->getEntries()), 4);
        $entry = $ifd1->getEntry(259);
        // Compression
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 6);
        $this->assertEqual($entry->getText(), 'JPEG compression');
        $entry = $ifd1->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 180, 1 => 1));
        $this->assertEqual($entry->getText(), '180/1');
        $entry = $ifd1->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 180, 1 => 1));
        $this->assertEqual($entry->getText(), '180/1');
        $entry = $ifd1->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        /* Sub IFDs of $ifd1. */
        $this->assertEqual(count($ifd1->getSubIfds()), 0);
        $thumb_data = file_get_contents(dirname(__FILE__) . '/canon-ixus-ii-thumb.jpg');
        $this->assertEqual($ifd1->getThumbnailData(), $thumb_data);
        /* Next IFD. */
        $ifd2 = $ifd1->getNextIfd();
        $this->assertNull($ifd2);
        /* End of IFD $ifd1. */
        $this->assertTrue(count(Pel::getExceptions()) == 0);
Esempio n. 20
0
    function testRead()
    {
        Pel::clearExceptions();
        Pel::setStrictParsing(false);
        $jpeg = new PelJpeg(dirname(__FILE__) . '/olympus-c50z.jpg');
        $exif = $jpeg->getExif();
        $this->assertIsA($exif, 'PelExif');
        $tiff = $exif->getTiff();
        $this->assertIsA($tiff, 'PelTiff');
        /* The first IFD. */
        $ifd0 = $tiff->getIfd();
        $this->assertIsA($ifd0, 'PelIfd');
        /* Start of IDF $ifd0. */
        $this->assertEqual(count($ifd0->getEntries()), 11);
        $entry = $ifd0->getEntry(270);
        // ImageDescription
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'OLYMPUS DIGITAL CAMERA         ');
        $this->assertEqual($entry->getText(), 'OLYMPUS DIGITAL CAMERA         ');
        $entry = $ifd0->getEntry(271);
        // Make
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'OLYMPUS OPTICAL CO.,LTD');
        $this->assertEqual($entry->getText(), 'OLYMPUS OPTICAL CO.,LTD');
        $entry = $ifd0->getEntry(272);
        // Model
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'X-2,C-50Z       ');
        $this->assertEqual($entry->getText(), 'X-2,C-50Z       ');
        $entry = $ifd0->getEntry(274);
        // Orientation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'top - left');
        $entry = $ifd0->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 144, 1 => 1));
        $this->assertEqual($entry->getText(), '144/1');
        $entry = $ifd0->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 144, 1 => 1));
        $this->assertEqual($entry->getText(), '144/1');
        $entry = $ifd0->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        $entry = $ifd0->getEntry(305);
        // Software
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), '28-1012                        ');
        $this->assertEqual($entry->getText(), '28-1012                        ');
        $entry = $ifd0->getEntry(306);
        // DateTime
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), false);
        $this->assertEqual($entry->getText(), '0000:00:00 00:00:00');
        $entry = $ifd0->getEntry(531);
        // YCbCrPositioning
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'co-sited');
        $entry = $ifd0->getEntry(50341);
        // PrintIM
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), 'PrintIM' . "" . '0250' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'ˆ' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '	' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'Ð' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'è' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'ÿ' . "" . '' . "" . '' . "" . '€' . "" . '' . "" . '' . "" . '€' . "" . '' . "" . '' . "" . '€' . "" . '' . "" . '' . "" . '€' . "" . '' . "" . '' . "" . '€' . "" . '' . "" . '' . "" . '€€€' . "" . '€' . "" . '' . "" . '' . "" . '	' . "" . '' . "" . '\'' . "" . '' . "" . '' . "" . '' . "" . '\'' . "" . '' . "" . '—' . "" . '' . "" . '\'' . "" . '' . "" . '°' . "" . '' . "" . '\'' . "" . '' . "" . '' . "" . '' . "" . '\'' . "" . '' . "" . '^' . "" . '' . "" . '\'' . "" . '' . "" . '‹' . "" . '' . "" . '' . "" . '\'' . "" . '' . "" . 'Ë' . "" . '' . "" . '\'' . "" . '' . "" . 'å' . "" . '' . "" . '\'' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '');
        $this->assertEqual($entry->getText(), '(undefined)');
        /* Sub IFDs of $ifd0. */
        $this->assertEqual(count($ifd0->getSubIfds()), 1);
        $ifd0_0 = $ifd0->getSubIfd(2);
        // IFD Exif
        $this->assertIsA($ifd0_0, 'PelIfd');
        /* Start of IDF $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getEntries()), 30);
        $entry = $ifd0_0->getEntry(33434);
        // ExposureTime
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 1, 1 => 80));
        $this->assertEqual($entry->getText(), '1/80 sec.');
        $entry = $ifd0_0->getEntry(33437);
        // FNumber
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 45, 1 => 10));
        $this->assertEqual($entry->getText(), 'f/4.5');
        $entry = $ifd0_0->getEntry(34850);
        // ExposureProgram
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 5);
        $this->assertEqual($entry->getText(), 'Creative program (biased toward depth of field)');
        $entry = $ifd0_0->getEntry(34855);
        // ISOSpeedRatings
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 80);
        $this->assertEqual($entry->getText(), '80');
        $entry = $ifd0_0->getEntry(36864);
        // ExifVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 2.2);
        $this->assertEqual($entry->getText(), 'Exif Version 2.2');
        $entry = $ifd0_0->getEntry(36867);
        // DateTimeOriginal
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), false);
        $this->assertEqual($entry->getText(), '0000:00:00 00:00:00');
        $entry = $ifd0_0->getEntry(36868);
        // DateTimeDigitized
        $this->assertIsA($entry, 'PelEntryTime');
        $this->assertEqual($entry->getValue(), false);
        $this->assertEqual($entry->getText(), '0000:00:00 00:00:00');
        $entry = $ifd0_0->getEntry(37121);
        // ComponentsConfiguration
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '' . "" . '');
        $this->assertEqual($entry->getText(), 'Y Cb Cr -');
        $entry = $ifd0_0->getEntry(37380);
        // ExposureBiasValue
        $this->assertIsA($entry, 'PelEntrySRational');
        $this->assertEqual($entry->getValue(), array(0 => 0, 1 => 10));
        $this->assertEqual($entry->getText(), '0.0');
        $entry = $ifd0_0->getEntry(37381);
        // MaxApertureValue
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 300, 1 => 100));
        $this->assertEqual($entry->getText(), '300/100');
        $entry = $ifd0_0->getEntry(37383);
        // MeteringMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 5);
        $this->assertEqual($entry->getText(), 'Pattern');
        $entry = $ifd0_0->getEntry(37384);
        // LightSource
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Unknown');
        $entry = $ifd0_0->getEntry(37385);
        // Flash
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 25);
        $this->assertEqual($entry->getText(), 'Flash fired, auto mode.');
        $entry = $ifd0_0->getEntry(37386);
        // FocalLength
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 1883, 1 => 100));
        $this->assertEqual($entry->getText(), '18.8 mm');
        $entry = $ifd0_0->getEntry(37500);
        // MakerNote
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), 'OLYMP' . "" . '' . "" . '>' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '$' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '8' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '@' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'H' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'T' . "" . '' . "" . '	' . "" . ' ' . "" . '' . "" . '' . "" . 'Z' . "" . '' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '' . "" . '|' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '' . "" . '„' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '' . "" . 'Œ' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '' . "" . '”' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '' . "" . '¤' . "" . '' . "" . '	' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '¸' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'Q' . "" . '' . "" . '' . "" . '' . "" . 'Q' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '	' . "" . '' . "" . '' . "" . '6' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'H' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'p' . "" . '' . "" . '' . "" . '' . "" . 'p@' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '&@' . "" . '' . "" . ' ' . "" . '' . "" . '' . "" . 'Ü' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'è¸' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . ' ' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '!' . "" . '' . "" . '' . "" . '' . "" . '°\'' . "" . '' . "" . '"' . "" . '' . "" . '' . "" . '' . "" . ' n#
' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '$' . "" . '' . "" . '' . "" . '' . "" . '6' . "" . '' . "" . '' . "" . '%
' . "" . '' . "" . '' . "" . '' . "" . '(' . "" . '' . "" . '&' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '\'' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '(' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . 'd)' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '*' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '+' . "" . '' . "" . '' . "" . '' . "" . 'T' . "" . '' . "" . ',' . "" . '' . "" . '' . "" . '' . "" . '
' . "" . '' . "" . '' . "" . '-' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '.' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '
' . "" . '' . "" . '/' . "" . '' . "" . '' . "" . '' . "" . '€' . "" . '' . "" . '0' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '1' . "" . '' . "" . '' . "" . '' . "" . 't' . "" . '' . "" . '3' . "" . 'Ð' . "" . '' . "" . ' ' . "" . '' . "" . '8' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . ';' . "" . '' . "" . '' . "" . '' . "" . '!¾<' . "" . '' . "" . '' . "" . '' . "" . '¾' . "" . '' . "" . '=
' . "" . '' . "" . '' . "" . '' . "" . 'ä' . "" . '' . "" . '>
' . "" . '' . "" . '' . "" . '' . "" . 'ì' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '' . "" . '');
        $this->assertEqual($entry->getText(), '758 bytes unknown MakerNote data');
        $entry = $ifd0_0->getEntry(37510);
        // UserComment
        $this->assertIsA($entry, 'PelEntryUserComment');
        $this->assertEqual($entry->getValue(), '                                                                                                                     ');
        $this->assertEqual($entry->getText(), '                                                                                                                     ');
        $entry = $ifd0_0->getEntry(40960);
        // FlashPixVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'FlashPix Version 1.0');
        $entry = $ifd0_0->getEntry(40961);
        // ColorSpace
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'sRGB');
        $entry = $ifd0_0->getEntry(40962);
        // PixelXDimension
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2560);
        $this->assertEqual($entry->getText(), '2560');
        $entry = $ifd0_0->getEntry(40963);
        // PixelYDimension
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 1920);
        $this->assertEqual($entry->getText(), '1920');
        $entry = $ifd0_0->getEntry(41728);
        // FileSource
        $this->assertIsA($entry, 'PelEntryUndefined');
        $this->assertEqual($entry->getValue(), '');
        $this->assertEqual($entry->getText(), 'DSC');
        $entry = $ifd0_0->getEntry(41985);
        // CustomRendered
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal process');
        $entry = $ifd0_0->getEntry(41986);
        // ExposureMode
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Auto exposure');
        $entry = $ifd0_0->getEntry(41987);
        // WhiteBalance
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Auto white balance');
        $entry = $ifd0_0->getEntry(41988);
        // DigitalZoomRatio
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 100, 1 => 100));
        $this->assertEqual($entry->getText(), '100/100');
        $entry = $ifd0_0->getEntry(41990);
        // SceneCaptureType
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Portrait');
        $entry = $ifd0_0->getEntry(41991);
        // GainControl
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41992);
        // Contrast
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41993);
        // Saturation
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        $entry = $ifd0_0->getEntry(41994);
        // Sharpness
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 0);
        $this->assertEqual($entry->getText(), 'Normal');
        /* Sub IFDs of $ifd0_0. */
        $this->assertEqual(count($ifd0_0->getSubIfds()), 1);
        $ifd0_0_0 = $ifd0_0->getSubIfd(4);
        // IFD Interoperability
        $this->assertIsA($ifd0_0_0, 'PelIfd');
        /* Start of IDF $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getEntries()), 2);
        $entry = $ifd0_0_0->getEntry(1);
        // InteroperabilityIndex
        $this->assertIsA($entry, 'PelEntryAscii');
        $this->assertEqual($entry->getValue(), 'R98');
        $this->assertEqual($entry->getText(), 'R98');
        $entry = $ifd0_0_0->getEntry(2);
        // InteroperabilityVersion
        $this->assertIsA($entry, 'PelEntryVersion');
        $this->assertEqual($entry->getValue(), 1);
        $this->assertEqual($entry->getText(), 'Interoperability Version 1.0');
        /* Sub IFDs of $ifd0_0_0. */
        $this->assertEqual(count($ifd0_0_0->getSubIfds()), 0);
        $this->assertEqual($ifd0_0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_0_1 = $ifd0_0_0->getNextIfd();
        $this->assertNull($ifd0_0_1);
        /* End of IFD $ifd0_0_0. */
        $this->assertEqual($ifd0_0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd0_1 = $ifd0_0->getNextIfd();
        $this->assertNull($ifd0_1);
        /* End of IFD $ifd0_0. */
        $this->assertEqual($ifd0->getThumbnailData(), '');
        /* Next IFD. */
        $ifd1 = $ifd0->getNextIfd();
        $this->assertIsA($ifd1, 'PelIfd');
        /* End of IFD $ifd0. */
        /* Start of IDF $ifd1. */
        $this->assertEqual(count($ifd1->getEntries()), 4);
        $entry = $ifd1->getEntry(259);
        // Compression
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 6);
        $this->assertEqual($entry->getText(), 'JPEG compression');
        $entry = $ifd1->getEntry(282);
        // XResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(283);
        // YResolution
        $this->assertIsA($entry, 'PelEntryRational');
        $this->assertEqual($entry->getValue(), array(0 => 72, 1 => 1));
        $this->assertEqual($entry->getText(), '72/1');
        $entry = $ifd1->getEntry(296);
        // ResolutionUnit
        $this->assertIsA($entry, 'PelEntryShort');
        $this->assertEqual($entry->getValue(), 2);
        $this->assertEqual($entry->getText(), 'Inch');
        /* Sub IFDs of $ifd1. */
        $this->assertEqual(count($ifd1->getSubIfds()), 0);
        $thumb_data = file_get_contents(dirname(__FILE__) . '/olympus-c50z-thumb.jpg');
        $this->assertEqual($ifd1->getThumbnailData(), $thumb_data);
        /* Next IFD. */
        $ifd2 = $ifd1->getNextIfd();
        $this->assertNull($ifd2);
        /* End of IFD $ifd1. */