Support » Plugin: Exifography » Incorrectly read camera model

  • Resolved dawilson

    (@dawilson)


    I love this plug-in but have hit a snag after upgrading my camera recently. For some reason, any shot taken with the new camera (a Nikon D810) results in the “Camera” field of the output showing “CORPORATION”. Looking at the images, the metadata seems fine and can be read by several other applications without problems. You can see the latest example at http://www.davewilsonphotography.com/2015/04/28/founders-day-2015-3/. If I download the image (using right click, “Save Image As…”), the metadata appears correct so this is a parsing problem rather than something getting messed up in the upload. Can you offer any suggestions?

    Thanks,

    Dave Wilson

    https://wordpress.org/plugins/thesography/

Viewing 15 replies - 1 through 15 (of 22 total)
  • Plugin Author kristarella

    (@kristarella)

    Hi Dave,

    Thanks for the example. I will look into it.

    Plugin Author kristarella

    (@kristarella)

    Hi Dave,

    Can you please send me a copy of the image before it was processed by Lightroom? I’d like to see if there’s any difference in the EXIF before exported from the software.

    I’ve determined that the EXIF camera Make is NIKON CORPORATION and the Model is NIKON D810. Most software seems to read these two properly, but when WordPress imports the image it is using the “CORPORATION” bit, which is very strange as it is only supposed to be using Model.
    This makes me think that the PHP Exif extension is reading NIKON as Make and CORPORATION as Model. When I deleted the whole Make field from the EXIF the Model was correctly imported by WordPress. There might be a weird character in the Make field that is messing the import up…

    Be good to compare to the unprocessed version if possible.

    Thanks.

    Thread Starter dawilson

    (@dawilson)

    The “unprocessed” version of the image looks to have the same metadata when I compare it to the one I downloaded from the site but, that said, I’ve not compared the binary. I’ve uploaded it to https://www.dropbox.com/s/dzzxy29gvuzj2vh/Founders_Day-3194.jpg?dl=0 for you to take a look at. Note that this has been through Lightroom so it’s not really “unprocessed” but it is pre-Wordpress.

    Plugin Author kristarella

    (@kristarella)

    Thanks, but do you have a version untouched by Lightroom? I’m trying to figure out where the problem originates: in the camera, or Lightroom. The results for this image are the same as your original post, and if I remove the camera make from this one the model shows properly.

    Thread Starter dawilson

    (@dawilson)

    Once it has uploaded, you’ll find the original raw file at https://www.dropbox.com/s/lcqygnmsbn45pfa/Founders_Day-3194.NEF?dl=0. From my perspective, every single picture goes through Lightroom and, given that the information is parsed correctly by other applications, I strongly suspect you’ll find the error isn’t in the original file but in the code that is reading it.

    Plugin Author kristarella

    (@kristarella)

    Hi Dave,

    Thanks for that. I think the issue might be arising in the export from Lightroom and whatever Lightroom is doing to the camera make. Somehow it is preventing PHP from processing the model field correctly (the model field comes directly after the make field in the EXIF order, as I mentioned before).

    I converted the NEF you provided to JPG in Preview and Pixelmator and the EXIF was imported correctly from both when uploaded to WordPress. So I can only assume that Lightroom is doing something strange to it.
    Screenshots of my results:
    https://cloudup.com/chioW2MeRv1
    https://cloudup.com/cS3wY5hHbA6

    Is it possible for you to exclude specific EXIF from the export from Lightroom? You might be able to get around this by telling it not to export the camera make with the photos.

    Thread Starter dawilson

    (@dawilson)

    Yes, it is possible to exclude various metadata fields on export from Lightroom. I’m still having a hard time with this given that Apple Preview can read the correct information from the file after I download it from my site, though. The content is obviously not corrupted given that and my code debugging gut instinct is still yelling that this must be a bug (perhaps a subtle one) in the parser as a result. What results do you get when you process the file that I originally sent (from the site)? Have you looked at the structure of the metadata within this and stepped through your parser checking to make sure that the field lengths are handled properly, for example?

    Plugin Author kristarella

    (@kristarella)

    The thing is Exifography is not parsing anything as far as the camera model is concerned and neither is WordPress. WordPress has EXIF import already enabled for some fields and my plugin just adds extra fields that WP didn’t already do and then displays it all. To import the camera model WordPress is using the native PHP EXIF module (http://php.net/manual/en/book.exif.php). So if anything is having trouble with the data it is PHP, which is installed at a server level.

    It’s entirely possible that this is the problem, in fact I think that is the problem. Since other software like ExifTool and Preview etc can all read the data, my suspicion is that there’s an invisible character in the camera make that is messing up the PHP parsing it, but not messing up these other programs. However, it’s also my belief that whatever that character or issue might be, it’s originating in Lightroom, because images processed in other ways work fine in WordPress.

    So, it seems to be a problem with PHP, not WordPress or Exifography. The only thing we can do about that is try upgrading our servers’ PHP and see if that helps, but I was testing on PHP 5.6.2, which is fairly recent. Or we can try to bypass the problem, by excluding the make field from the image export.

    We could test further by using a plain PHP script independent of WordPress that reads the EXIF from this image and see what it turns up. There is even one written here: http://www.dzone.com/snippets/php-exif-reader-demo I might try it in the morning (bit too tired now), but that’s looking for a much longer term solution.

    Thread Starter dawilson

    (@dawilson)

    Ah, I see – sorry. I assumed that Exifography itself was parsing the metadata out of the files. I guess this means that the debug has to travel deeper into the stack. If I can find some time, I’ll research the PHP module you mention and try playing with it locally to see what it does.

    Plugin Author kristarella

    (@kristarella)

    No need to apologise!
    Yes, I think it goes deeper. Let me know if you find anything.

    Plugin Author kristarella

    (@kristarella)

    Interesting result! I tested the photo with that script I linked to above and this is what came out:

    exif library present
    Focal Length: 380/10
    ISO: 800
    Shutter: 1/90
    Manufacturer: 
    Model: CORPORATION
    Software: 
    Focal Number: 56/10
    Aperture: f/5.6
    Flash: shot
    Date: 24-04-2015
    Time: 18:07:28

    So it’s definitely on the PHP level that this is going wrong.

    Thread Starter dawilson

    (@dawilson)

    Given my lack of PHP experience, I strongly suspect I’ll be living with this one for a while. If you feel like raising the bug report, that would be fantastic (given that you can talk intelligently about the library as an actual user).

    I have the same problem. And just tagging along here, in hopes of a solution.

    But I would like to add that my older posts, still shows the right camera name.

    Thanks for a great plug-in kristarella.

    Plugin Author kristarella

    (@kristarella)

    @aknot – We determined that Lightroom was doing something to the Camera Make field that was making it be parsed incorrectly by PHP: the problem goes deeper than WordPress or Exifography and the only practical solution for the time being is to exclude the make EXIF from the Lightroom export.

    If you give me an example of an image that is having this problem I can check if it is actually the same issue.

    Just chiming in as “me too”. And to make things more weird, Sony ILCE-6000 (a.k.a. alpha-6000) does not show either the camera type or the “model”.

    My D810 shows “CORPORATION” as the model (check here: http://www.remonen.fi/photoblog/zen-ja-valokuvaus/) and ILCE-6000 does not show anything as camera model (check here: http://www.remonen.fi/photoblog/istanbulassa-helsingissa/). And no, the data is not encrypted, the language is Finnish 🙂

    When inspected in Lr, Nikon has “NIKON CORPORATION” as “Make” and Sony has “SONY”. So, the first word in that field gets discarded and rest of it is used as “Camera” in Exifography. The data in the field “Model” is not used at all (it has the correct info “D810” and “ILCE-6000”).

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘Incorrectly read camera model’ is closed to new replies.