Skip to main content
Participating Frequently
March 9, 2012
Open for Voting

P: 'Save with history'

In the save dialog in photoshop, you can check or uncheck: 'layers', 'as a copy' and some other options.

It would be nice if you could also check 'with history', to preserve your history while closing or sending a file.

In that way, other people that open your file can see the steps you've made, and you can get back to how you started a year after your project is finished.

It takes up some more space of course, maybe the application can show you how much of a difference in MB's it would take.

47 replies

Inspiring
May 2, 2016
Hmm, saving snapshots (entire document states) is an interesting idea.
It's already possible to do manually, but I'm not sure if scripts or automation plugins have enough information to automate the process.

Could you write that up as a separate request topic?
Translate
Inspiring
May 2, 2016
> Are you aware of the possible complexity of a seemingly simple thing like a brushstroke in a pixle based image editor? >

We all want do-overs in life.<G>

Has anyone talked about creating a new document from the current state, saving it as a separate file, then after closing the document you're working on, you can open both again and drag the history from the new document you saved off into the document you finished with, using the History brush to paint back with? You can do the same thing if you save a snapshot with merged layers, then save those snapshots you want before closing.

Maybe there's something there that Adobe can reasonably do to make saving these snapshot/documents easier at the end of the day. I don't know—target the snapshot (or better still, perhaps be able to target multiple snapshots) and go straight to Save As New Document, the way we save layers to files? We still have a responsibility to create the snapshots we think we might want to get back to, but if we messed up the face of our sitter, while the rest of the image was stellar, we could paint an intermediate stage back in from a saved snapshot, then fix just that, perhaps?

It wouldn't have to be all or nothing, where I highly suspect that means nothing, but just a little more convenient, no?
Translate
Stephen Marsh
Community Expert
Community Expert
May 30, 2026

I use History Snapshots a lot in my workflow, so this is something that I asked to be scripted, before I learned to script. Keep in mind that all History States and Snapshots are held in RAM for the open document and are not restored when opening, which is why saving a copy of the current State or Snapshot can be important.

 


 

/* https://community.adobe.com/t5/photoshop-ecosystem-discussions/save-all-history-snapshots-as-files/m-p/7857534 */
#target photoshop;
app.bringToFront();
main();
function main(){
if(!documents.length) return;
try{
var Path = activeDocument.path;
}catch(err){
alert("You save your document before running this script!");
return;
}
var doc = app.activeDocument;
var now = doc.activeHistoryState;
var Snaps = snapShotList();
var outputFolder = Folder(Path + "/snapshots");
if(!outputFolder.exists) outputFolder.create();
for (var z in Snaps){
revertNamedSnapshot(Snaps[z]);
var saveFile = File(outputFolder + "/" + Snaps[z].toString().replace(/\./g,'_') + ".jpg");
//var saveFile = File(outputFolder + "/" + Snaps[z].toString().replace(/\./g,'_') + ".psd");
//var saveFile = File(outputFolder + "/" + Snaps[z].toString().replace(/\./g,'_') + ".tif");

SaveForWeb(saveFile,80);
//SavePSD(saveFile);
//SaveTIFF(saveFile);
}
doc.activeHistoryState = now;
};
function SaveTIFF(saveFile){
tiffSaveOptions = new TiffSaveOptions();
tiffSaveOptions.embedColorProfile = true;
tiffSaveOptions.byteOrder = ByteOrder.IBM;
tiffSaveOptions.transparency=true;
tiffSaveOptions.interleaveChannels=true;
tiffSaveOptions.alphaChannels = false;
tiffSaveOptions.imageCompression = TIFFEncoding.NONE;
activeDocument.saveAs(saveFile, tiffSaveOptions, true, Extension.LOWERCASE);
};
function SavePSD(saveFile){
psdSaveOptions = new PhotoshopSaveOptions();
psdSaveOptions.embedColorProfile = true;
psdSaveOptions.alphaChannels = true;
psdSaveOptions.layers = true;
psdSaveOptions.annotations = true;
psdSaveOptions.spotColors = true;
activeDocument.saveAs(saveFile, psdSaveOptions, true, Extension.LOWERCASE);
};
function SaveForWeb(saveFile,jpegQuality) {
var sfwOptions = new ExportOptionsSaveForWeb();
sfwOptions.format = SaveDocumentType.JPEG;
sfwOptions.includeProfile = false;
sfwOptions.interlaced = 0;
sfwOptions.optimized = true;
sfwOptions.quality = jpegQuality;
activeDocument.exportDocument(saveFile, ExportType.SAVEFORWEB, sfwOptions);
};
function snapShotList(){
var doc = app.activeDocument;
var hs = doc.historyStates;
var now = doc.activeHistoryState;
var Name = new Array();
for(var a =0;a <hs.length;a++){
if(hs[a].snapshot) {
doc.activeHistoryState = hs[a];
Name.push(hs[a].name);
}
}
doc.activeHistoryState = now;
return Name;
};
function revertNamedSnapshot(name) {
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putName( charIDToTypeID('SnpS'), name );
desc.putReference( charIDToTypeID('null'), ref );
executeAction( charIDToTypeID('slct'), desc, DialogModes.NO );
};

 

Translate
c.pfaffenbichler
Community Expert
Community Expert
May 1, 2016
»Christoph appears to be a troll as much as anything useful.«
On what sample (of threads to which I have contributed) do you base that conclusion? 

Edit: 
»But just to ignore it (and it is an issue that can be solved) is lazy.«
Are you aware of the possible complexity of a seemingly simple thing like a brushstroke in a pixle based image editor? 
Translate
Inspiring
April 30, 2016
Well there is the problem. Now they can find a solution and make everyone happy. But just to ignore it (and it is an issue that can be solved) is lazy.
Translate
Inspiring
April 30, 2016
No, Photoshop history is not a history of commands - Photoshop is not a metadata editor.
History in Photoshop is a lot of pixel data (which is why it takes up so much scratch disk space), plus some metadata.  No, it cannot simply be played back -  Photoshop is not that simple, and the file really would be huge.
Translate
Inspiring
April 30, 2016

Simply because I detest the troll thinking that some people allow themselves to fall into, I wanted to contribute that I think it is ABSURD to negate something that could be so useful to a significant majority of users simply because you find a particularly distasteful (i.e. large file size) attribute about it.  

Hell, since it is simply a history of commands, Adobe could simply have Photoshop rerun the commands when the file opens if said user opts for that annoyance.  If that is their desire and need, there is little reason not to allow it.  It would be THEIR time wasted (not wasted in their view) and the file would be the same size as they had before.

 


[Abuse removed by moderator. Please follow forum guidelines to

be kind and respectful or you risk being banned from the forums.]

 

 

Translate
Stephen Marsh
Community Expert
Community Expert
May 30, 2026

“Adobe could simply have Photoshop rerun the commands when the file opens if said user opts for that annoyance.”

 

This could (mostly) be done with an action recording every move, with the option to record brush strokes. I personally wouldn’t want to go there!

Translate
Inspiring
August 4, 2014
Darn. Defeated by the perfect analogy again. Chapeau.
Translate
Inspiring
July 29, 2014
"Go to moon, pick up rock. How hard can that be?"
Translate
Inspiring
July 29, 2014
»» I'll retract the word "trivial",«
»Well, that would seem to be something.
Now I'm tempted to retract my retraction.

»really insufficiently clear?
Yes. This is a generic statement which could apply, in its essence, to any number of applications. History is in storage already before the document is closed, it can be moved to different storage. Whatever method is used to match up data structures in memory can be replicated in the saved file.
Saved layers max: 8000
Saved history states max: 0
There. That's clear.

I've been roped into training Photoshop a few times. Lack of history saving has come up many times, with the same reaction every time: "Wha?".

Let's let this one go. Clearly, you feel the feature is not important enough, or too difficult, to implement. And I don't.
Translate
c.pfaffenbichler
Community Expert
Community Expert
July 20, 2014
» I'll retract the word "trivial",«
Well, that would seem to be something.

»but I have not been given any contradictory evidence, just blanket statements.«
So is the statement
»What's difficult is matching up all the thousands of data structures that make up a document and it's history states and making them work correctly again after reloading.«
really insufficiently clear?
Translate