|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-06-16 18:24 UTC] gillesvds at adok dot info
Description: ------------ --- From manual page: http://www.php.net/function.exif-read-data --- Exporting JPEG from Adobe Lightroom 6 (and 6.1) which conforms strictly with the industry standards do not more comply with exif_read_data() for at least 3 fields: Copyright (contains just a substring), Make (empty), Model (empty). Test script: --------------- var_dump(exif_read_data($theFile)); // Then, look at the fields PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 03:00:01 2025 UTC |
Thanks. I've downloaded the image and this script: <?php $data = array_intersect_key( exif_read_data('./69854.jpg'), ['Copyright' => null, 'Make' => null, 'Model' => null] ); var_dump($data); produces: array(3) { ["Make"]=> string(1) "☺" ["Model"]=> NULL ["Copyright"]=> string(10) "llesvds.fr" } Apparently, this is nonsense, but Adobe Lightroom concentrates not on classic EXIF, but rather on IPTC metadata in XMP format[1]. IPTC metadata are not subject of exif_read_data(), but rather of iptcparse(). Using the example from the iptcparse() man page[2] yields somewhat better results, but still not what is desired. I believe, however, that this is not a bug in iptcparse(), because the documentation states: | Parse a binary IPTC block into single tags. XMP format is, however, not binary, but an application of XML. Therefore I'm switching this ticket to feature request. You may consider to look for a PHP library which can read and parse IPTC/XMP metadata. [1] <https://helpx.adobe.com/lightroom/help/metadata-basics-actions.html> [2] <http://php.net/manual/en/function.iptcparse.php#refsect1-function.iptcparse-examples>