15 Replies Latest reply: Jul 5, 2012 6:11 PM by JJMack RSS

    Photoshop CS4 smart object template just overwrote a raw file - HELP

    mojoimagery

      So.  I've been working in Photoshop extensively for about 6 years now and I am well aware that nothing we do in Photoshop or Lightroom is supposed to overwrite a raw file.  I'm not talking about changing it to something a little lighter or darker, I'm talking about replacing a picture of one baseball player with another one - and the original? Gone. 

       

      Here's what happened: I have a poster template that contains several layers, 7 of which are smart objects.  I change the pictures in the template by right-clicking the smart object layer and selecting "replace smart object," browsing to the new image, selecting, and here is what SHOULD happen: the target picture opens in Adobe camera raw, I make some small edits, click done or okay or something similar, and that new image has replaced the old one in the template.  What DID happen was this: I followed the procedure above and selected my target raw file, the picture that was already in the template (the one I was trying to replace with my target file) opened in Adobe camera raw.  I thought - Hey, that's wierd!  Closed the ACR dialog and tried again.  Same thing happened.  I opened lightroom and saw - to my HORROR - that the target file had been changed to the same image that was in the template.

       

      If it clarifies: pictures of player A (who played in 2009) is in all of the smart object layers in my template.  I want to make that poster be of player B (who played in 2012) so I begin replacing all the smart objects.  When I get to the 3rd image in the poster template, Photoshop overwrites my raw file of player B with the smart object photo of Player A.  There were no photos of player A on the network drive that the picture of Player B was on.  But there's one now.  My raw file shows that it was modified about 10 minutes ago. 

       

      We tried undoing in Photoshop.  That did nothing.  We tried deleting the xmp file.  That did nothing.  We removed it from the lightroom catalog and reimported it.  It is now a picture of Player A from 2009 and my picture of Player B from 2012 is just gone. 

       

      Anybody have any idea what this could be and how we could avoid it in the future?

       

      Best,

      Jamey

        • 1. Re: Photoshop CS4 smart object template just overwrote a raw file - HELP
          JJMack MVP

          Jamey

           

          I do not use lightroom but I do use Photoshop.   Photoshop can not write a raw file other then change metadata.   A smart object layer contains an embedded smart object. What an embedded smart object is a copy of something Photoshop is capable of working on. If could be a copy of a RAW file and its raw conversion settings. Could also be a tiff or a layer or sever layer or layer group.  It can be anything Photoshop can work on depends on how the smart object was made.  In any case the embedded smart object is a copy not the original.  When you replace the contents of a smart object layer you would replace it with a object that is the same size of the current embedded smart object for every smart object layers has an associated transform for the object.  This is not replaces.  For example you could place in a raw file into a Photoshop document and Transform it to half the document size. You can the dupe the layer twice and move the dupes with a transform to half of the remaining space. Thus creating a picture package. There is one shared embedded smart object that is associated with the three smart object layers each with it own transform. Replace the smart object content on any of there smart object layers replaces the contents of all three layers for the share a common smart object.   You can also create independent smart objects by using menu Layer>Smart Objects>New smart Object Via Copy.   If you transform each of these smart object to occupied 1/3 the document you can replace and also work on them independently.   By double clicking on the copies smart icon in the layers palette on at time ACR will open on the embedded smart object using its copied raw settings. I can change the Raw settings and click done ACR will update the independent embedded smart object accordantly. So you can have several raw conversion in a single document.  If all are the same size and on top of each other you can blended the versions to bring out additional.

           

          Now when you work on a smart object in Photoshop by double clicking on a layer's smart object icon often Photoshop open a temp work document when you save it Photoshop will also update the embedded smart object the was double clicked on.  The Save on a windows system save the temp work document in the users temp space I do not know where it would save on a Mac.  You also need to close the work document to get it out of Photoshop.  There is also nothing to stop you from saving a copy on a network drive you have write access to.  Did you perhaps do that.

          • 2. Re: Photoshop CS4 smart object template just overwrote a raw file - HELP
            mojoimagery Community Member

            Well, thanks for your response.  The only thing I can see in there that addresses the issue is your question: Did you perhaps [save a copy on a netword drive you have write access to]?  No, we did not open the smart object and then save it over the other file that it overwrote.  I am well aware that Photoshop is not supposed to be able to do what it did.  I wonder if this has happened to others, and what we can do, other than never using the "replace smart object" link in our templates to fix the problem.

            • 3. Re: Photoshop CS4 smart object template just overwrote a raw file - HELP
              Noel Carboni Community Member

              What JJ may have been trying to get at is that Photoshop really can't overwrite a raw file in itself.  I really suspect that Lightroom played a pivotal role in this.

               

              What would be very helpful is for you to set up some test files, then find a specific sequence of operations (or repeat those you've already done) that reliably reproduce the problem.  Capture a video of your desktop or take screenshots every step of the way, so people can see EXACTLY what you're doing, what names you've entered, what buttons you've pressed, etc. that led to the failure.

               

              If you can do that and report back here showing exactly how to reproduce the failure, I'm sure that will aid the Adobe folks tremendously in quickly identifying and reproducing your situation - or maybe someone can show you why what you did wasn't right somehow (unlikely, as you seem to know what you're doing, but possible).

               

              I don't have Lightroom myself, or I'd try to reproduce it from what you've posted above.  Frankly, stuff like this has always made me leery of using a database-based system to manage my files.  Heck, I don't even use Bridge, and I get all the functionality I need out of Windows Explorer.

               

              Best of luck to you.

               

              -Noel

              • 4. Re: Photoshop CS4 smart object template just overwrote a raw file - HELP
                JJMack MVP

                Like Noel and I wrote Photoshop can not write a RAW file's RAW data.  Bridge, ACR and Lightroom seem to be able to update RAW files metadata.  RAW sensor data should not be able to be written by these programs.  Photoshop is a Document editor is does not edit files.  It can write image files using its document data structures. However it can not write a Camera RAW format file.  Its RAW option does not write a camera RAW file it writes a Adobe RAW file which is something else all to together.

                 

                Lightroom is a none destructive image developer.  It writes data that describes how to develop the RAW data into and RGB Image it may store that data in a DGN RAW file as metadata however it outputs RGB image Files format.  Camera RAW files are not RGB images they are mosaic images at best.

                 

                Lightroom and Bridge can Rename and copy files I believe. I do not have Lightroom and don't use Bridge much and I don't use it to copy or rename files.  Programs that can copy and rename files may ba able to do what your seeing. Perhaps overlay files also.

                 

                It is also posible to rename files from with in Open and Save file dialogs by changing names in the file list area...

                • 5. Re: Photoshop CS4 smart object template just overwrote a raw file - HELP
                  mojoimagery Community Member

                  JJ and Noel - thank you for your responses.  I understand the Photoshop shouldn't be able to do what it did and there are all sorts of reasons why what happened to me - should not have been able to happen.  As for whether Photoshop wrote a raw file's raw data, maybe that's not what it did at all.  But the end result of what Photoshop did is that one file with a file extension of cr2 now has a different image in it.  I understand that Lightroom is a non-destructive image developer and an image in Lightroom should not be altered in its raw state by anything that Lightroom can do (aside from deleting it). 

                   

                  I should state that this has happened to us only once or twice before and we - well, we can't reproduce it except by accident.  As far as we can tell, it happens randomly because we do the same key strokes all day long.  I should also state that we didn't open the file from Lightroom, so lightroom, I don't think, is responsible.  We opened the file in Photoshop.  I wondered at one point if it were happening because the original filename in the template was the same as the filename we were replacing it with.  But this year, we appended the minute and second to the filename, so I'm thinking - what are the chances this image from another season had the same name?  Not very good. But then, who knows if somehow the original filename without the appended info is in the metadata somewhere anyway?

                   

                  Now - JJ - when you say "overlay files" - what do you mean?  Because that feels like a good description for what happened.

                   

                  We performed no save operation at any point during the sequence of events that ended with the image in one raw file being replaced by the image in the smart object.

                  • 6. Re: Photoshop CS4 smart object template just overwrote a raw file - HELP
                    conroy Community Member

                    I know it's too late for this particular event, but maybe you can avoid future catastrophe by ensuring that you have at least one secure backup of your files before doing anything with them.

                    • 7. Re: Photoshop CS4 smart object template just overwrote a raw file - HELP
                      mojoimagery Community Member

                      Thanks Conroy.  We have a raid array, but not a redundant backup.  Who even knew this sort of thing could happen?  Better yet, who knows how to stop this from ever happening again?

                      • 8. Re: Photoshop CS4 smart object template just overwrote a raw file - HELP
                        conroy Community Member

                        Disaster can strike your files at any moment regardless of the software, hardware and expertise of users. What about the possibility of theft, fire, flood or some other disastrous scenario? You must start arrangements for a backup solution tomorrow. That includes keeping a backup at another secure physical location, perhaps a bank safety deposit, and never having all backup sets in the one location at any given time.

                        • 9. Re: Photoshop CS4 smart object template just overwrote a raw file - HELP
                          JJMack MVP

                          mojoimagery wrote:

                           

                          Now - JJ - when you say "overlay files" - what do you mean?  Because that feels like a good description for what happened.

                           

                          We performed no save operation at any point during the sequence of events that ended with the image in one raw file being replaced by the image in the smart object.

                          As I wrote Smart Object layers embedded object is a copy of the original  and if you replace it you replace it with a copy of some other object. Embedded object are copies and independent from the original.  If after creating a smart Object layer who's embedded object is a copy of a raw file and its conversion settings. You change the original RAW files RAW conversion settings the smart object layer raw conversion setting are not changes for its a copy with independent raw conversion settings. When you replace a smart object layers contents you will replace the embedded object and you should replace it with an object the has the same pixel size and orientation. Because there is an associated transform for the object in the layer that is not replaced. The replacement is also a copy.  If the original smart object was created using  File Open where you choose a RAW file  ACR would open with the RAW files current conversion settings.  In ACR you can changes the setting then hold down the shift key to change the open image button to an Open Object button.  Using that button ACR will open a smart object layer in Photoshop the contents of the embedded object is a copy of the RAW file and the current ACR settings.  No File is written Photoshop is not a File Editor its a Document editor that has many data structures for different layer types.  When you replace the contents of a smart object you will be put into a "Place" file selection dialog if you choose a raw file it should have the same orientation as the image being replaced because of the associated transform. When you choose a RAW file ACR will open and you can change the conversion settings however there will be no Open Image button instead there will be an OK button.  There is also a save image button and you can save a RAW file that is a DNG file not a CR2 file. Like the DNG converter. If you click the OK button the embedded object in the smart object layer will be replaced with a copy of the selected RAW file and the current ACR settings. Again there is no file written Photoshop is not a File editor just the embedded smart object data is replaced in Photoshop smart object layer's data structure.

                           

                          I do not think the use of smart objects in you process caused what you are experiencing and because it only happens once an a while I feel its more likely caused by some human error made during the processing in those cases. I would look elsewhere for what causing the overlay. In the place file selection dialog it is possible to rename files perhaps even by accident. Programs like LR and Bridge can rename and copy files perhaps overlay other files.

                          • 10. Re: Photoshop CS4 smart object template just overwrote a raw file - HELP
                            mojoimagery Community Member

                            Thanks Conroy, for your concern.  I will get right on that.

                            JJ - I WISH I had a movie to show you what happened.  Because you would be blown away.  I'm going to try to make one so that we can be sure that we are talking about EXACTLY the same dialogs and keystrokes, because we are spending a lot of time on a discussion of dialogs and keystrokes, and also on what Photoshop is capable of doing.  Which is where this discussion belongs, I think, at least for now.  Will be back to post it once I've got something to show, although I'm pretty sure we won't be able to recreate the problem. 

                             

                            The thing that sticks out in my mind when you say: " I do not think the use of smart objects in you process caused what you are experiencing and because it only happens once an a while I feel its more likely caused by some human error made during the processing in those cases" is that the image in the raw file we were going to replace the smart object image with was instead replaced BY THE IMAGE IN THE SMART OBJECT.  That draws a very hard line from the smart object image to the raw file image.  And it happened AT THE TIME THAT WE WERE WORKING IN THE TEMPLATE.  Which I think draws a very hard line to Photoshop as the culprit.  I know of nothing that I should be able to do in photoshop (or lightroom for that matter) that can replace the image in a raw file - and it is a raw file.  It opens in Adobe Camera Raw (which brings up another question - is Adobe Camera Raw opening it because it has a cr2 file extension, or does ACR ONLY work with actual raw files?).

                             

                            Thanks for thinking on this with me.

                            • 11. Re: Photoshop CS4 smart object template just overwrote a raw file - HELP
                              JJMack MVP

                              Also remember what function ACR provides.  It coverts Camera RAW Sensor DATA into an RGB IMAGE.  Beside being able to save and open RGB images It can also convert an CR2 file into a new RAW DNG file.  I can imagine ACR may update a RAW file metadata with RAW setting when it  processing a RAW file or it may simply pass that metadata to Photoshop along with the converted RGB image.  ACR does not create RAW data it only works on it.  If ACR updates a RAW file with metadata it may have to copy out the raw data it read. However it would be a very unusual bug programming for a program to read in a new file and update a previously processed file instead of updating the file it has just read in and converted.  Previously processed files normally have been closed during the previous use of ACR and that use of ACR has terminated. When you replace the smart object contents you do so through Photoshop Place feature when you choose a raw file the ACR plug in is used and this single file is passed to it.  This invocation of ACR  was not passed the old RAW File and all the Photoshop has access to is a copy of that RAW file in the smart object layer.  I can not conceive of how ACR could even find out where the original RAW file was located.   I think to only possible RAW data mixup that could happen is that the replacement RAW file could possible be over ridden with the original images RAW data because that is the only other raw data around when the newly selected file is being accessed.

                               

                              Re reading your original append this is what you wrote seems to be happening the newley selected RAW file RAW data is being replaced with the original templates RAW data. Like ACR failed to read in the new files RAW data first replacing the old. Does the Image you seen on screen change to the new image. Is there a mixup in data areas was the new image read in at all. could it perhaps been an undetected file read or network file read error that cause this problem.  Did the image on screen change from the template image to the newly selected image????

                              • 12. Re: Photoshop CS4 smart object template just overwrote a raw file - HELP
                                Noel Carboni Community Member

                                JJMack wrote:

                                 

                                If ACR updates a RAW file with metadata

                                Just to clarify this, ACR will not update a raw file that is in a format that's not openly defined.

                                 

                                Thus it will write data into a DNG, but not a CR2 or NEF.

                                 

                                But I think we're off on a bit of a tangent here...  From the sound of things, the raw file itself was replaced in entirety by another, different raw file.  That's what makes me think it was a part of the toolset that manipulates the files, not the image.

                                 

                                Besides the desktop video (a great idea), you might want to describe a bit more about the network / server setup you have where these files are being manipulated as well.  My thoughts even briefly drifted toward a network or disk error that could have caused this.  Plus if the files are on a network, it's conceivable that someone else could have made a mistake doing something entirely different, but coincident in time with the problem you saw.  I'm not saying this is the case, just that the possibility, however remote, exists.

                                 

                                And I second Conroy's advice and the urgency he expressed:  Stop what you're doing, go out and get some inexpensive external USB drives, and institute data backup ASAP.  RAID or no, as you have shown your data is always at risk.  If you (or your network administrator) need some good advice on how to set up backup, just say so.

                                 

                                -Noel

                                • 13. Re: Photoshop CS4 smart object template just overwrote a raw file - HELP
                                  JJMack MVP

                                  Noel

                                  I have not done any difinitive test but I know I have update RAW Files meta data with the Bridge.  It may also the case that the ACR plug-in update a RAW files metadat to include RAW conversions data like it does in DNG file.  If ACR does update Metadata it may have to write the entire file including the RAW data it read and did not change.  That is why I suggested the it may be cause by a undetected read error.  The template raw data should be replaced with the new raw file data.  An undetected read error could possibly cause this type of failure. The problem I had with what he wrote at one time there was nor file a on the nework nor there is,  He might have ment file b is now file a....

                                  • 14. Re: Photoshop CS4 smart object template just overwrote a raw file - HELP
                                    Noel Carboni Community Member

                                    You can update metadata all day in Bridge or Camera Raw for any kind of raw file and it remembers your settings.  But the only kind of file the software will write the metadata back into directly is one that's openly documented, not a proprietary file.  In the cases where the file format is proprietary, e.g., a raw CR2 or NEF file from Canon or Nikon, Adobe stores the metadata separately (e.g., in a sidecar XMP or central database), since they CANNOT know how to write data back into that file in a way that will not violate an undocumented format.

                                     

                                    Note the wording from mojoimaging's original post:  ''We tried deleting the xmp file''

                                     

                                    I brought this up because the file that mojoimagery found overwritten/replaced is apparently a proprietary raw file.  Thus we can focus attention on the portions of the system that do file manipulation, not metadata manipulation, because the Adobe software simply cannot write content back into a proprietary raw file, implying the entire file was replaced.

                                     

                                    It would be useful to look at the actual file on disk to see the various dates (creation, modification).

                                     

                                    -Noel

                                    • 15. Re: Photoshop CS4 smart object template just overwrote a raw file - HELP
                                      JJMack MVP

                                      Noel Yes RAW Data format is proprietary but files are not, also just about every image editing program that support RAW files decode just about every proprietary raw format that exist. As I wrote files are not proprietary and programs like copy will copy raw files all day long.  I wrote perhaps because I do not know for sure that when a program like the Bridge or ACR updates a RAW files metadata they may have to write a whole new file. The metadata may need be contiguous or before the raw data. I do not know but if some requitement like that exist the metadata updating  program would need to write a new file containing the updated metadata with a copy of the unaltered proprietary formatted RAW data.