当前位置: 首页>>代码示例>>PHP>>正文


PHP Pel::clearExceptions方法代码示例

本文整理汇总了PHP中Pel::clearExceptions方法的典型用法代码示例。如果您正苦于以下问题:PHP Pel::clearExceptions方法的具体用法?PHP Pel::clearExceptions怎么用?PHP Pel::clearExceptions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pel的用法示例。


在下文中一共展示了Pel::clearExceptions方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testRead

 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);
 }
开发者ID:kbrack1,项目名称:UptoBox,代码行数:9,代码来源:no-exif.php

示例2: testRead

    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
//.........这里部分代码省略.........
开发者ID:ni-c,项目名称:pel,代码行数:101,代码来源:olympus-c765uz.php

示例3: testRead

    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
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:pic2base-svn,代码行数:101,代码来源:olympus-c5050z.php

示例4: testRead

    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
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:pic2base-svn,代码行数:101,代码来源:olympus-c50z.php

示例5: testRead

    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);
//.........这里部分代码省略.........
开发者ID:ni-c,项目名称:pel,代码行数:101,代码来源:sony-dsc-v1.php

示例6: testRead

 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);
//.........这里部分代码省略.........
开发者ID:ni-c,项目名称:pel,代码行数:101,代码来源:nikon-coolscan-iv.php

示例7: testRead

    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
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:pic2base-svn,代码行数:101,代码来源:olympus-c765uz.php

示例8: updateMetadata

 /**
  * upaded meta information
  */
 public static function updateMetadata($path, $foldername, $filename)
 {
     $params = JComponentHelper::getParams('com_eventgallery');
     $libPath = JPATH_SITE . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_eventgallery' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'vendors' . DIRECTORY_SEPARATOR . 'pel' . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR;
     require_once $libPath . 'PelJpeg.php';
     require_once $libPath . 'PelTiff.php';
     @(list($width, $height, $type, $attr) = getimagesize($path));
     $exif = array();
     try {
         $input_jpeg = new PelJpeg($path);
         $app1 = $input_jpeg->getExif();
         if ($app1) {
             $tiff = $app1->getTiff();
             $ifd0 = $tiff->getIfd();
             $exifData = $ifd0->getSubIfd(PelIfd::EXIF);
             if ($exifData) {
                 if ($data = $exifData->getEntry(PelTag::APERTURE_VALUE)) {
                     $value = $data->getValue();
                     $aperture = floor(pow(2, $value[0] / $value[1] / 2) * 10.0) / 10.0;
                     $exif['fstop'] = sprintf('%.1f', $aperture);
                 }
                 if ($data = $exifData->getEntry(PelTag::FOCAL_LENGTH)) {
                     $value = $data->getValue();
                     $exif['focallength'] = sprintf('%.0f', $value[0] / $value[1]);
                 }
                 if ($data = $ifd0->getEntry(PelTag::MODEL)) {
                     $exif['model'] = $data->getText();
                 }
                 if ($data = $exifData->getEntry(PelTag::ISO_SPEED_RATINGS)) {
                     $exif['iso'] = $data->getText();
                 }
                 // we need to store the image size differently if we rotate the image later.
                 if ($params->get('use_autorotation', 1) == 1 && $ifd0 != null) {
                     $orientation = $ifd0->getEntry(PelTag::ORIENTATION);
                     if ($orientation != null) {
                         if ($orientation->getValue() == 6 || $orientation->getValue() == 8) {
                             $tempWidth = $width;
                             $width = $height;
                             $height = $tempWidth;
                         }
                     }
                 }
             }
         }
     } catch (Exception $e) {
     }
     $exifJson = json_encode($exif);
     $db = JFactory::getDBO();
     $query = $db->getQuery(true);
     $query->update("#__eventgallery_file");
     $query->set("width=" . $db->quote($width));
     $query->set("height=" . $db->quote($height));
     $query->set("exif=" . $db->quote($exifJson));
     $query->where('folder=' . $db->quote($foldername));
     $query->where('file=' . $db->quote($filename));
     $db->setQuery($query);
     $db->execute();
     Pel::clearExceptions();
     unset($input_jpeg);
 }
开发者ID:sansandeep143,项目名称:av,代码行数:63,代码来源:local.php

示例9: testRead

    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
//.........这里部分代码省略.........
开发者ID:kbrack1,项目名称:UptoBox,代码行数:101,代码来源:leica-d-lux.php

示例10: testRead

    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
//.........这里部分代码省略.........
开发者ID:ni-c,项目名称:pel,代码行数:101,代码来源:olympus-c5050z.php

示例11: testRead

    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);
//.........这里部分代码省略.........
开发者ID:kbrack1,项目名称:UptoBox,代码行数:101,代码来源:sony-dsc-v1.php

示例12: testRead

    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);
//.........这里部分代码省略.........
开发者ID:ni-c,项目名称:pel,代码行数:101,代码来源:nikon-e5000.php

示例13: testRead

    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);
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:pic2base-svn,代码行数:101,代码来源:nikon-e950.php

示例14: testRead

    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');
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:pic2base-svn,代码行数:101,代码来源:pentax-istDS.php

示例15: testRead

    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));
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:pic2base-svn,代码行数:101,代码来源:canon-powershot-s60.php


注:本文中的Pel::clearExceptions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。