PDA

View Full Version : Is reading EXIF data fixed on EE2?


manutremo
13th of October 2006 (Fri), 14:41
In EE1.5 some EXIF data were not read correctly, for example the shutter speed.

Has this been fixed in EE2?

Is there a way to re-read the EXIF data from the photos so that it is correct?

Thanks!

Pekka
13th of October 2006 (Fri), 17:02
There are fixes in that area, but nothing major.
Yes, you can re-read selected EXIF data to photo in photo editor.

DavidW
13th of October 2006 (Fri), 18:15
I'm intending to do a major code read and debug on the metadata reading routines in EE - I've already found and fixed a couple of bugs that Pekka has incorporated the fixes for into EE 2.01, but a more comprehensive look is awaiting completion of the EE installation on my own server so that I can debug the PHP more easily. Extensive debugging on my hosting provider's web cluster is impossible.


I'm making progress - I got MySQL 5.0, PHP 5 and Apache 2.2 installed and configured in a FreeBSD jail on my local FreeBSD box last night, and fixed a problem to do with reply packets going out of the wrong interface and confusing my router into RSTing the traffic (the joys of multihoming FreeBSD boxes - the network code isn't yet fully modular and whilst the behaviour is arguably correct from a routing point of view, it's broken with respect to the current "one IP per jail" rule). That routing problem slowed the charge a little, as it took a couple of hours experimenting with the help of Wireshark until I had the correct pf rules to sort it out. I'm now reasonably confident that the installation work I've done this far is all working correctly.

That's the bulk of the server configuration done, but I still need to install and configure an FTP server in the jail - I'm currently looking at proftpd. When I've done that, I'll get a copy of my EE installation onto the server, as well as either updating or rewriting the somewhat moribund DBG port for FreeBSD so that I can install the third party DBG extension in PHP. Once all that is done - work that I was intending to do anyway at some point, but with EE 2's release I found a particular reason to do it - I can debug PHP code more easily, and I'll set to work with EE's metadata reading code.


I share your suspicion that something is not quite right in the built in EXIF code; it does seem to misread EXIF data in some images. I may put out a call for images that have trouble reading metadata correctly in EE, but I'm going to see what I can do with what I've already got, as I believe I have a couple of troublesome images.

I wouldn't be surprised if there's some kind of alignment error in EE's internal EXIF code that some images excite. It seems to get it completely wrong for some images, as if it has failed to identify the EXIF block in the images and parses the wrong data entirely instead. That said, the EE code works correctly in the vast majority of cases. What I believe doesn't work at all is the XMP/XAP category reader, at least not with images saved in Photoshop CS2 (though I think the bug may be with the code that parses the XML "bag") - that is the bug I'm particularly wishing to fix.


Can you confirm that you're using the internal EXIF engine and, if possible, post (a link will do) to one or more images that EE fails to read the EXIF data correctly for. If you've got the EXIF extension in PHP on your server, does that work correctly when enabled instead of EE's own EXIF code? Sadly, it seems that few servers have the EXIF extension installed.



David

jeronimo
15th of October 2006 (Sun), 09:36
What i find a tiny bit anoying is that the shutter time is expressed as pure seconds. I thought before it was lik 1/250 sec (where it is right now 0.004).
The first seting (1/250) is wat mostley is shonw on the camere display, so more people reconize this.
Is there a way to change this?

DavidW
23rd of October 2006 (Mon), 12:58
The replacement code I posted here (http://photography-on-the.net/forum/showthread.php?t=230992) sorts out the image metadata reading problems I've had with JPEGs saved from Photoshop CS2. You may like to consider it if you're having problems.



David

MCB
28th of December 2006 (Thu), 22:57
I have had a lot of trouble with EXIF data being imported correctly. My jpegs are from Photoshop CS2 and I'm using EE 2.02. For example, my exposure time is rarely displayed correctly.

I tried your updated script and it helped. I have one photo where the image has EXIF data indicating a 13 second exposure. This is imported to EE as 1/2 (displayed as a fraction). In another case the exposure was 6 seconds and was imported as 1.713456. Anyway, after pasting in your script, the exposure times are correct.

There are other fields that are occasionally wrong, too, like the focal length. But in some cases that is not EE, it is either my camera or Photoshop. I had actually assumed it was EE, but just realized that the jpegs have the wrong EXIF data, too. (A focal length of 238mm from a 50mm prime lens??) So I'm not sure which errors are from EE, what is due to being mangled in photoshop and what is just a glitch in the camera (350D).

Now I just need to manually update my EXIF data a couple hundred times... or is there a way to automatically update the EXIF data for all images in the database?

Thanks for the updated script. Your effort is appreciated. :)

[EDIT: I should note that some images were uploaded using EE 1.5, others with 2.0, and a few with 2.02. So it is possible that updates in 2.02 will eliminate some of the problems for future uploads. But some files uploaded to 2.02 are still having the wrong exif data associated with them. I updated the exif for those recent images using your script and now have correct exposure times.]

Pekka
28th of December 2006 (Thu), 23:26
Above fix is in 2.02, one more fix is available in http://photography-on-the.net/forum/showpost.php?p=2431916&postcount=4

EXIF is not easy to get right, cameras keep changing and editing software save differently. But it is getting better all the time.

There is selective EXIF import in photo editor. Making that work in batch mode would not really make the procedure any faster as it is up to the user to filter correct data visually.