Skip to content

Commit 46d8453

Browse files
author
Marek Szymczuk
committed
Fixed duplicated tags.
1 parent 09eead9 commit 46d8453

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

lib/PHPExif/Adapter/Exiftool.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function getExifFromFile($file)
102102
{
103103
$result = $this->getCliOutput(
104104
sprintf(
105-
'%1$s%3$s -j -a -G0 -c %4$s %2$s',
105+
'%1$s%3$s -j -a -G1 -c %4$s %2$s',
106106
$this->getToolPath(),
107107
escapeshellarg($file),
108108
$this->numeric ? ' -n' : '',

lib/PHPExif/Mapper/Exiftool.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,33 +25,33 @@
2525
class Exiftool implements MapperInterface
2626
{
2727
const APERTURE = 'Composite:Aperture';
28-
const APPROXIMATEFOCUSDISTANCE = 'XMP:ApproximateFocusDistance';
29-
const ARTIST = 'EXIF:Artist';
30-
const CAPTION = 'XMP:Caption';
28+
const APPROXIMATEFOCUSDISTANCE = 'XMP-aux:ApproximateFocusDistance';
29+
const ARTIST = 'IFD0:Artist';
30+
const CAPTION = 'XMP-acdsee';
3131
const CAPTIONABSTRACT = 'IPTC:Caption-Abstract';
32-
const COLORSPACE = 'EXIF:ColorSpace';
33-
const COPYRIGHT = 'EXIF:Copyright';
34-
const CREATEDATE = 'EXIF:CreateDate';
32+
const COLORSPACE = 'ExifIFD:ColorSpace';
33+
const COPYRIGHT = 'IFD0:Copyright';
34+
const CREATEDATE = 'ExifIFD:CreateDate';
3535
const CREDIT = 'IPTC:Credit';
36-
const EXPOSURETIME = 'EXIF:ExposureTime';
37-
const FILESIZE = 'File:FileSize';
38-
const FOCALLENGTH = 'EXIF:FocalLength';
36+
const EXPOSURETIME = 'ExifIFD:ExposureTime';
37+
const FILESIZE = 'System:FileSize';
38+
const FOCALLENGTH = 'ExifIFD:FocalLength';
3939
const HEADLINE = 'IPTC:Headline';
4040
const IMAGEHEIGHT = 'File:ImageHeight';
4141
const IMAGEWIDTH = 'File:ImageWidth';
42-
const ISO = 'EXIF:ISO';
42+
const ISO = 'ExifIFD:ISO';
4343
const JOBTITLE = 'IPTC:By-lineTitle';
4444
const KEYWORDS = 'IPTC:Keywords';
4545
const MIMETYPE = 'File:MIMEType';
46-
const MODEL = 'EXIF:Model';
47-
const ORIENTATION = 'EXIF:Orientation';
48-
const SOFTWARE = 'EXIF:Software';
46+
const MODEL = 'IFD0:Model';
47+
const ORIENTATION = 'IFD0:Orientation';
48+
const SOFTWARE = 'IFD0:Software';
4949
const SOURCE = 'IPTC:Source';
5050
const TITLE = 'IPTC:ObjectName';
51-
const XRESOLUTION = 'EXIF:XResolution';
52-
const YRESOLUTION = 'EXIF:YResolution';
53-
const GPSLATITUDE = 'EXIF:GPSLatitude';
54-
const GPSLONGITUDE = 'EXIF:GPSLongitude';
51+
const XRESOLUTION = 'IFD0:XResolution';
52+
const YRESOLUTION = 'IFD0:YResolution';
53+
const GPSLATITUDE = 'GPS:GPSLatitude';
54+
const GPSLONGITUDE = 'GPS:GPSLongitude';
5555

5656
/**
5757
* Maps the ExifTool fields to the fields of
@@ -172,8 +172,8 @@ public function mapRawData(array $data)
172172

173173
// add GPS coordinates, if available
174174
if (count($gpsData) === 2 && $gpsData['lat'] !== false && $gpsData['lon'] !== false) {
175-
$latitudeRef = empty($data['EXIF:GPSLatitudeRef'][0]) ? 'N' : $data['EXIF:GPSLatitudeRef'][0];
176-
$longitudeRef = empty($data['EXIF:GPSLongitudeRef'][0]) ? 'E' : $data['EXIF:GPSLongitudeRef'][0];
175+
$latitudeRef = empty($data['GPS:GPSLatitudeRef'][0]) ? 'N' : $data['GPS:GPSLatitudeRef'][0];
176+
$longitudeRef = empty($data['GPS:GPSLongitudeRef'][0]) ? 'E' : $data['GPS:GPSLongitudeRef'][0];
177177

178178
$gpsLocation = sprintf(
179179
'%s,%s',

0 commit comments

Comments
 (0)