1. Go to this page and download the library: Download codewiser/exiftool library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
codewiser / exiftool example snippets
use Codewiser\Exiftool\Exiftool;
// With latest specification
$exiftool = new Exiftool('/bin/exiftool');
// Or with another
$exiftool = new Exiftool('/bin/exiftool', '/path/to/specification.json');
use Codewiser\Exiftool\Iptc;
public function read(string $filename): Iptc
{
return $this->exiftool()->read($filenme);
}
use Codewiser\Exiftool\Iptc;
use Symfony\Component\Process\Process;
public function write(string $filename, Iptc $data): Process
{
return $this->exiftool()->write($filenme, $data);
}
use Symfony\Component\Process\Process;
public function write(string $filename): Process
{
return $this->exiftool()->clear($filenme, $data);
}
(string) $data->captionWriter;
// the same as
$data->captionWriter?->toString();
$data->captionWriter = 'me';
(string) $data->dateCreated;
// the same as
$data->dateCreated?->toDateTime()->format('c');
$data->dateCreated = time();
$data->dateCreated = new \DateTime();
use Codewiser\Exiftool\Attributes\AltLangAttribute;
AltLangAttribute::useLocale('de');
(string) $data->description;
// the same as
$data->description?->toString();
$data->description = 'about';
use Codewiser\Exiftool\Exiftool;
$exiftool = new Exiftool($bin);
$values = $exiftool->specification()->topLevel()
->getAttributeByJsonName('dataMining')->enum();
[
'MR-NON' => 'None',
'MR-NAP' => 'Not Applicable',
'MR-UMR' => 'Unlimited Model Releases',
'MR-LMR' => 'Limited or Incomplete Model Releases',
]
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.