Hello,
I notice that Gallery2 is not using the built in php functions to read exif/iptc data. Most importantly to me is the _parseMarkerAdobe function in modules/exif/lib/JPEG/JPEG.inc. It appears this is where IPTC keywords are parsed.
The problem is that it's not working right; the IPTC keywords from my images are not being extracted and placed in to the keyword field. If I use the builtin PHP function exif_read_data I can get the keywords just fine. It looks like Gallery2 is using a rather complicated set of code to extract EXIF and IPTC data manually by walking through the image header, rather than by using the exif_read_data function.
Maybe this is because Gallery was reading EXIF before exif_read_data existed? Could be. But now that exif_read_data is there and is reliable, is there a reason to parse the header manually anymore?
My goal is to simply be able to import my pics and have my keywords imported too. I think the problem is that I use Apple's Aperture, which I'm told follows the jpeg spec very closely, which Adobe diverged a bit year ago, but does it closer to the spec now. Photoshop reads the keywords correctly, as does "exif_read_data", but Gallery2 doesn't.
So, any ideas on how to fix this? I think using exif_read_data is the "right" answer, but I don't know the history of why parsing is done manually.
I'd be happy to send or point anyone to an image that can reproduce this issue.
Thanks,
Allan
Posts: 32509
http://php.net/manual/en/ref.exif.php
-> php must explicitely be compiled with exif support, else you don't get these functions.
-> most users can't just recompile php and most webhosts won't do that for them.
-> there are libraries as the one used in g2 that do the exif information parsing as well without requiring compiled-in php extensions.
that's why we don't use the php exif extension.
you can write your own exif module for g2, or you can hack the existing one, to use the built-in php exif extension instead of the 3rd party exifer library used in g2.
as to your reported issue:
that might be a bug. i heard about aparture / g2 exif issues a few times.
the problem is: there's no maintainer for the 3rd party exif lib that we use, not any more.
but if you can provide a detailed bug report, maybe we can fix the bug ourselves.