|Posted: Mon, 2006-09-04 06:56|
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.