php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #69854 Facilitate reading and parsing of IPTC/XMP metadata
Submitted: 2015-06-16 18:24 UTC Modified: 2015-06-16 20:22 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: gillesvds at adok dot info Assigned:
Status: Open Package: *Graphics related
PHP Version: 5.4.42 OS: Windows or Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
50 - 40 = ?
Subscribe to this entry?

 
 [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




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-16 18:56 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2015-06-16 18:56 UTC] cmb@php.net
Can you make such an image available for download?
 [2015-06-16 19:01 UTC] gillesvds at adok dot info
-Status: Feedback +Status: Assigned
 [2015-06-16 19:01 UTC] gillesvds at adok dot info
You can download the cover of my portfolio : www.gillesvds.fr
 [2015-06-16 20:21 UTC] cmb@php.net
-Summary: exif_read_data() does not conform with industry standards +Summary: Facilitate reading and parsing of IPTC/XMP metadata -Status: Assigned +Status: Open -Type: Bug +Type: Feature/Change Request -Package: EXIF related +Package: *Graphics related
 [2015-06-16 20:21 UTC] 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 20:22 UTC] cmb@php.net
-Status: Assigned +Status: Open -Assigned To: cmb +Assigned To:
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 08:01:28 2024 UTC