Announcement

#16 2013-12-06 18:35:42

martinis
Member
2013-07-02
32

Re: exif error while uploading

I have investigated further and the problem may well be due to how the metadata is stored within the photo jpg file. Firstly, although the GPS information doesn't reveal itelf in Piwigo and is not  stored in the Piwigo database, it is definitiely still in the photo file on the web site and all the metadata seems to be able to be accessed in the photo file outside Piwigo.  I found Jeffrey Friedl's on-line Exif (Image data) viewer (at http://regex.info/exif.cgi) very helpful for this. So Piwigo is not reading all the metadata correclty somehow.  As Flop25 suggests, this may be due to compatibility of the PHP Exif supporting EXIF 2.2 whereas the Exif information written by Canon is in version 2.3. But I cannot directly change how my camera stores the metadata, and although I could try using exiv2 or similar, it is difficult to do so without some serious understanding of what is going wrong.

I came across reports concerning the Makernote tag. eg on http://en.wikipedia.org/wiki/Exchangeab … rNote_data, it states Unfortunately, the proprietary formats used by many manufacturers break if the MakerNote tag is moved - i.e. by inserting or editing a tag which precedes it. The reason to edit to the Exif data could be as simple as to add copyright information, an Exif comment, etc .  Thus it is possible that when I am adding a description/caption and GPS to the image file, something is messing up the way the metadata is stored. Removing the image description from the jpg file turned out to be one solution which then allowed successful import into Piwigo from Digikam, in so far as the GPS information was imported into the Piwigo database.

This was not really satisfactory, but just by luck I hit on a workaround - add the title and image description BEFORE adding GPS coordinates.  So far, after re-uploading 3 images, this seems to work and the metadata (GPS, title, caption and tags) get through to Piwigo using the Piwigo export plugin in Digikam.  If you add GPS information to the jpg file first, then something must interfere with how the metadata is stored, so that it is not read correctly. I cannot give any explanations however.

Offline

 

#17 2014-02-14 12:20:30

martinis
Member
2013-07-02
32

Re: exif error while uploading

The solution I posted above proved only to work randomly.  After more investigation, I have concluded that the problem lies either with Canon putting non-standard tags (makernotes) within the photo, or to the version of PHP I am using not being able to read the tags (even after upgrading on my host to PHP 5.4.25), or to the exif library on the server not being at 2.3. In a direct upload, I have received errors about "Corrupt EXIF header: maximum directory nesting level reached". Possibly PHP stalls at an exif_read_data(). A PHP bug #66443  https://bugs.php.net/bug.php?id=66443 has been reported albeit with a Fujifilm camera.

The only solution I can find, which does not really resolve the problem but is acceptable to me, is to remove the Canon makernotes  tags from the photo, which is simple using EXIFTOOLS:

$exiftool -makernotes=   filename.JPG

The key photo information (speed, aperture, GPS, etc) still remains available. 

I hope this may be useful if anyone else has this problem with a recent Canon EOS camera.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact