src/PelExif.php
public function load(PelDataWindow $d)
    {
        Pel::debug('Parsing %d bytes of Exif data...', $d->getSize());

        /* There must be at least 6 bytes for the Exif header. */
        if ($d->getSize() < 6) {
            throw new PelInvalidDataException('Expected at least 6 bytes of Exif ' . 'data, found just %d bytes.', $d->getSize());
        }
        /* Verify the Exif header */
        if ($d->strcmp(0, self::EXIF_HEADER)) {
            $d->setWindowStart(strlen(self::EXIF_HEADER));
        } else {
            throw new PelInvalidDataException('Exif header not found.');
        }

        /* The rest of the data is TIFF data. */
        $this->tiff = new PelTiff();
        $this->tiff->load($d);
    }
public function load(PelDataWindow $d)
    {
        Pel::debug('Parsing %d bytes of Exif data...', $d->getSize());

        /* There must be at least 6 bytes for the Exif header. */
        if ($d->getSize() < 6) {
            throw new PelInvalidDataException('Expected at least 6 bytes of Exif ' . 'data, found just %d bytes.', $d->getSize());
        }
        /* Verify the Exif header */
        if ($d->strcmp(0, self::EXIF_HEADER)) {
            $d->setWindowStart(strlen(self::EXIF_HEADER));
        } else {
            throw new PelInvalidDataException('Exif header not found.');
        }

        /* The rest of the data is TIFF data. */
        $this->tiff = new PelTiff();
        $this->tiff->load($d);
    }
public function load ( PelDataWindow $ d ) { Pel :: debug ( 'Parsing %d bytes of Exif data...' , $ d -> getSize ( ) ) ; /* There must be at least 6 bytes for the Exif header. */ if ( $ d -> getSize ( ) < 6 ) { throw new PelInvalidDataException ( 'Expected at least 6 bytes of Exif ' . 'data, found just %d bytes.' , $ d -> getSize ( ) ) ; } /* Verify the Exif header */ if ( $ d -> strcmp ( 0 , self :: EXIF_HEADER ) ) { $ d -> setWindowStart ( strlen ( self :: EXIF_HEADER ) ) ; } else { throw new PelInvalidDataException ( 'Exif header not found.' ) ; } /* The rest of the data is TIFF data. */ $ this -> tiff = new PelTiff ( ) ; $ this -> tiff -> load ( $ d ) ; }
Load and parse Exif data.

This will populate the object with Exif data, contained as a
{@link PelTiff} object. This TIFF object can be accessed with
the {@link getTiff()} method.

@param PelDataWindow $d
Load and parse Exif data .