Req #69854 [Asn->Opn]: Facilitate reading and parsing of IPTC/XMP metadata

From: Date: Tue, 16 Jun 2015 20:22:41 +0000
Subject: Req #69854 [Asn->Opn]: Facilitate reading and parsing of IPTC/XMP metadata
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-193578@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69854&edit=1 ID: 69854 Updated by: cmb@php.net Reported by: gillesvds at adok dot info Summary: Facilitate reading and parsing of IPTC/XMP metadata -Status: Assigned +Status: Open Type: Feature/Change Request Package: *Graphics related Operating System: Windows or Linux PHP Version: 5.4.42 -Assigned To: cmb +Assigned To: Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2015-06-16 20:21:20] cmb@php.net 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> ------------------------------------------------------------------------ [2015-06-16 19:01:40] gillesvds at adok dot info You can download the cover of my portfolio : www.gillesvds.fr ------------------------------------------------------------------------ [2015-06-16 18:56:52] cmb@php.net Can you make such an image available for download? ------------------------------------------------------------------------ [2015-06-16 18:24:32] 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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69854&edit=1

« previous php.bugs (#193578) next »