Search code examples
imagecropphotoshoppsd

how to crop image in photoshop save and not loose original psd after saving


basically after i crop an image in Photoshop from a PSD and save it, the original psd is lost. How can i not loose the original PSD after cropping and saving? Here are the steps in more detail:

1) i open a psd in Photoshop
2) I click the cropping tool in left hand side
3) i select the area i want to crop
4) I save the cropped area as a separate png file

now after step 4, i loose the original psd the cropped image was from, but how can i not loose the original psd?


Solution

  • If you are actually programming with ExtendScript, use a snapshot before you do your stuff, then revert afterwards like this:

    // get docRef
    var docRef = app.activeDocument;
    
    // take a snapshot to revert to
    var savedState = docRef.activeHistoryState;
    
    // ... do your stuff
    
    // revert to initial state
    docRef.activeHistoryState = savedState;
    

    If you are not actually programming but just mousing around in Photoshop graphically, go to the Window menu across the top of Photoshop and turn on the History window. Then click on the Open button to go back to how the document looked when you opened it before you did your cropping.