When saving, Photoshop strips metadata from files critical to a workflow

JN
Posted By
Jim_Neumann
Jan 27, 2009
Views
318
Replies
10
Status
Closed
Apple uses some extended attributes in their Spotlight indexed file metadata. When you open a file, make a change, and save it the metadata is gone.

As an example, an image from the web will have an extended attribute of kMDITemWhereFroms identifying the source URL. It also refers to email messages a file may have come from.

This is VERY useful information but the saving process destroys it!! Can someone shed some light on this? If not, can anyone direct me to someone who can??

Thanks.

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

CC
Chris_Cox
Jan 27, 2009
Um, that makes little sense.

Spotlight doesn’t edit the file to add metadata – it stores some additional data in it’s own database.

When an application resaves the file, the original may be gone (especially due to safe saves) and spotlight will lose it’s metadata.

Apple might be able to help you.
WZ
Wade_Zimmerman
Jan 27, 2009
I responded on the Illustrator Forum and I am wondering how this effects his workflow?

I have never had need to use this info, but then I would never take anything off the web for professional use without permission and then I would know and I would take the Metadata from the bridge save it as a template and load it in Illustrator or Photoshop.

I really do not understand how it can impact some ones workflow and have never heard anyone accessing this info before.
JN
Jim_Neumann
Jan 27, 2009
@Wade: The web image is just an example – and I probably do a lot of things on a Mac you have probably never heard of anyone doing! 8^)

@Chris: Thanks for responding.

You say "When an application resaves the file, the original may be gone (especially due to safe saves) and spotlight will lose it’s metadata." the original may, in fact, be replaced by an auxiliary file that has been renamed to "appear" to be the original but from a User standpoint this IS the same file and should carry the same metadata, extended or otherwise..

1. Why are Spotlight Comments (kMDItemFinderComments) maintained?
2. Why doesn’t InDesign appear to exhibit this destructive behavior yet Photoshop and Illustrator do? (I haven’t checked Flash docs yet).

Thanks for your time.
WZ
Wade_Zimmerman
Jan 27, 2009
@Wade: The web image is just an example – and I probably do a lot of things on a Mac you have probably never heard of anyone doing! 8^)

Like what? Just curious!

I would say if it was something Photoshop was not designed to do then what would you expect?
JN
Jim_Neumann
Jan 27, 2009
@Chris:

I definitely don’t want to tell you guys your business (and I apologize if it seems that way >.< )… this is from Apple’s Developer Center: This is the source code for the FSReplaceObject tool, an example command line tool which shows how to exercise the FSReplaceObject and FSPathReplaceObject related APIs. These APIs are provided to assist in properly preserving metadata during "safe save" operations. < http://developer.apple.com/samplecode/FSReplaceObject/listin g1.html>

Thanks for listening.
CC
Chris_Cox
Jan 27, 2009
Jim – yes, replacing the original does appear to be the original, and it is — except to Spotlight. Photoshop preserves the metadata in the file, but Spotlight loses the data due to a fragile design in Spotlight.

InDesign should have the same problem, if their safe save code is working correctly.

And you’ll have to ask Apple why spotlight isn’t working as it should. We’re already doing what Apple suggests.
WZ
Wade_Zimmerman
Jan 27, 2009
Perhaps Apple see this a s a security issue? I would think if what you say is true that might be a way into some ones system. Maybe they strip it so know one using spotlight is vulnerable?
R
Ram
Jan 27, 2009
Spotblight is useless anyway. It misses a bunch of folders and files. Just one of the reasons I’ve disabled Spotblight permanently.
JN
Jim_Neumann
Jan 30, 2009
Hey Chris:

I’m in the middle of documenting the problem in detail for both Photoshop and Illustrator.

When doing a Save on several formats the original IS NOT retained. This can be confirmed by documenting the inodes. Different inode, different file – and the extended attributes are per inode, NOT per filename (as would be expected).

I won’t go into the laundry list since there are so many formats Photoshop can save to but notably Photoshop and TIFF files replace the original in the filesystem. JPEG files retain the original and, as expected, the extended attributes (including the critical metadata I need). (And no, I can’t make my workflow use only JPEG files – LOL! ;^)

Thanks for listening and please let me know if there’s someone who would be responsible for the code on the Saving mechanisms (if such a person exists – I don’t know how your duties are broken up) that I could talk to. Cheers!
CC
Chris_Cox
Jan 30, 2009
Jim – of course the original is not retained: the apps are doing a safe save (where you save to a new filename, then replace the original with the duplicate in a semi-atomic way). This is done using standard OS APIs whenever possible, and is done in most applications. All file saves in Photoshop behave the same way, except maybe PDF (which is in some code we don’t control) and SaveForWeb (also different code).

Again, the root cause is an Apple bug in the way they chose to associate metadata with the files, and how they updated existing APIs to deal with the additional metadata. We might be able to work around this using new APIs — but should apps have to change their code every time someone decides to add new metadata invisible to the app and separate from the file? Shouldn’t the design of the metadata system be more robust, and work with existing applications? Shouldn’t someone have thought about this before releasing a metadata system, that, well, nobody knew about?

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

Related Discussion Topics

Nice and short text about related topics in discussion sections