Summary on EXIF data handling by PS CS?

DH
Posted By
Dan_Heller
Jan 28, 2004
Views
431
Replies
5
Status
Closed
I am trying to read EXIF info from jpg’s written by PS CS (and 7.1) on a UNIX box using various EXIF-parsers. There are three that I’ve found, each one written by different people, and all follow the standardized EXIF spec. One package is:

<http://search.cpan.org/~ccpro/Image-EXIF-0.98.6/EXIF.pm>, and another is

< http://search.cpan.org/~gaas/Image-Info-1.16/lib/Image/Info. pm>.

Both of these packages are pretty good and stable when reading EXIF info from jpgs, so far as I can tell. However, they crash when trying to read EXIF headers from jpgs written from PS-generated jpegs. Of course, it’s their fault for crashing, no question about it. If they can’t handle the proper memory management and pointer-dereferencing, it’s their fault.

However, it also points to a problem that the reason they’re getting the bad data in the first place is that they’re expecting certain data to be there that isn’t, or in the wrong format, or breaking certain boundaries or specs. Again, they should catch these, but the fact that it’s happening is suggestive of the fact that the data in the EXIF header is somehow in a bad format, or is subtly violating some part of the spec. I can only attribute the problem to PS at this point.

The hard part about this is that the programs die so intermittently (as is always the case when there are memory violations), so it’s really hard to pinpoint exactly where the actual problem lies within the EXIF-parsing procedures. Now, if I were the developer of these packages, I could use proper software development tools to figure it out, but I’m not at that level and can’t really afford to get down into it only to determine where, in fact, PS is breaking the rules when it’s writing these headers.

So, I just thought I’d nip this in the bud and ask what the state of affairs is with the PS team’s awareness of such potential problems, and if there are any documented "known" outstanding bugs that we can know about so as to stop "futzing" with things and pay attention to other problems till a patch comes around.

Dan Heller
www.danheller.com

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

PD
Paul_D._Ferguson
Jan 28, 2004
Hi Dan,

Given your description, I think you’re premature to say "I can only attribute the problem to PS at this point". It sounds like these utilities may be hitting some sort of edge condition which they aren’t handling well. This doesn’t imply Photoshop is writing "bad" EXIF information, however. As far as I know, Photoshop adheres to the EXIF specification and writes valid EXIF data.

I suggest contacting the owners of these utilities to see whether they can offer any information. Since they are both Perl modules, perhaps they are using the same underlying jpeg parsing code, for example.

Paul
DH
Dan_Heller
Jan 28, 2004
You’re right to say that my assumption was premature. I should have been more thorough in the basis for my suspicion, which was mostly rooted from the discussion in many realms, starting here in the adobe forums, and off into specialized discussion boards from perl coders, image parsers, and digital camera forums. The common underlying thread has been about exif-parsing programs problems with images generated by PS.

You are correct (as I acknowledged) that programs are responsible for managing their own stability (not to crash, regardless of the data they’re reading), but if I put two and two together, it looks as though the programs wouldn’t crash if they were getting data that was within the specs they’re working from, and if PS is getting some bad raps for writing incorrectly-formatted exif headers, this could be further indicators of such problems.

My hypothesis is clearly circumstancial, hence my initial query: Can someone summarize (in formal terms) the current status of PS’s handling of EXIF headers in images? It would be nice to see something comprehensive, that includes stuff beyond the scope of this particular issue. That is, there are notes about how PS overwrites fields with its own info, whereas people would prefer PS leaves it alone. Not a "bad" thing PS is doing, but it should be "noted" so that it’s disclosed and people can program/deal with it as they see fit. Another example: are there any outstanding issues not supporrted? Are there any TODO items? Are there any known backwards-compatibility concerns?

Be sure that I’m not necessarily suggesting that anyone go and fix anything (in the context of this request), just that there is a central documented listing of known problem.
DH
Dan_Heller
Jan 29, 2004
new developments:

Through more extensive testing of the packages I noted above, which caused me to search more on the web for other tools, I have found that BOTH the packages above are having problems with their own memory management independently of PS’s EXIF format. I found a package that does NOT have the problem, and seems to be a lot more versatile to boot. However, it’s not written entirely in the spirit of how perl modules are supposed to be written, and the API is somewhat "loose" in areas… but each of these issues are quite easily worked-around. The package is called "ExifTool", and it can be downloaded from:
<http://owl.phy.queensu.ca/~phil/exiftool/>

Also, the other notes I made about people complaining about PS EXIF format seem to be related how it handles RAW conversion and its habit of filling in fields with data that people don’t want (or don’t think it should). These issues are an aside, as they have nothing to do with whether there are "bugs" in the file format itself.

So, if anyone is at all interested in this thread, I suppose it’s closed. 🙂
PD
Paul_D._Ferguson
Jan 29, 2004
Hi Dan,

Thanks for the update. Metadata (encompassing EXIF, IPTC, and XMP) is complex, and can be confusing. This posting by Marc Pawliger provides some information about how metadata works in Photoshop CS: MarcPawliger "Photoshop CS changing my Exif Data" 11/12/03 1:15am </cgi-bin/webx?14/2>

You can also learn more about XMP (the primary metadata mechanism used in Adobe applications) at <http://www.adobe.com/products/xmp/main.html>

Paul
DH
Dan_Heller
Jan 29, 2004
Thanks for this follow-up. I posted my follow-up to the article you referenced. This is a big issue, although not the issue I initially thought it was. Still, good things are learned anyway.

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

Related Discussion Topics

Nice and short text about related topics in discussion sections