PHPExif is a library which gives you easy access to the EXIF meta-data of an image.
PHPExif serves as a wrapper around some native or CLI tools which access this EXIF meta-data from an image. As such, it provides a standard API for retrieving and accessing that information.
- Native PHP functionality (exif_read_data, iptcparse)
- Exiftool adapter (wrapper for the exiftool binary)
"miljar/php-exif": "0.*"
<?php
// reader with Native adapter
$reader = \PHPExif\Reader::factory(\PHPExif\Reader::TYPE_NATIVE);
// reader with Exiftool adapter
//$reader = \PHPExif\Reader::factory(\PHPExif\Reader::TYPE_EXIFTOOL);
$exif = $reader->getExifFromFile('/path/to/file');
echo 'Title: ' . $exif->getTitle() . PHP_EOL;
<?php
$adapter = new \PHPExif\Reader\Adapter\Exiftool(
array(
'toolPath' => '/path/to/exiftool',
)
);
$reader = new \PHPExif\Reader($adapter);
$exif = $reader->getExifFromFile('/path/to/file');
echo 'Title: ' . $exif->getTitle() . PHP_EOL;
Please submit all pull requests against the correct branch. The release branch for the next version is a branch with the same name as the next version. Bugfixes should go in the master branch, unless they are for code in a new release branch.
PHPExif is written according the PSR-0/1/2 standards. When submitting code, please make sure it is conform these standards.
All contributions are welcomed and greatly appreciated.
Have a bug or a feature request? Please open a new issue. Before opening any issue, please search for existing issues.