Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
// for getting tiffs of layercomps;
#target photoshop
var myDocument = app.activeDocument;
// getting the name and location, thanks to xbytor;
var basename = myDocument.name.match(/(.*)\.[^\.]+$/)[1];
var docPath = myDocument.path;
// tiff options;
tifOpts = new TiffSaveOptions();
tifOpts.embedColorProfile = true;
tifOpts.imageCompression = TIFFEncoding.TIFFLZW;
tifOpts.alphaChannels = false;
tifOpts.byteOrder = ByteOrder.MACOS ;
tifOpts.layers = true;
// create the versions;
for (var m = 0; m < myDocument.layerComps.length; m++) {
// apply the layer comp;
myDocument.layerComps.apply();
var theLayerCompName = myDocument.layerComps.name;
// duplicate the image;
var thecopy = myDocument.duplicate (thecopy, true);
// save the tiff;
thecopy.saveAs((new File(docPath+"/"+basename+"_E"+theLayerCompName+"_S01.tif")),tifOpts,true);
thecopy.close(SaveOptions.DONOTSAVECHANGES);
app.activeDocument = myDocument;
};
Copy link to clipboard
Copied
Find more inspiration, events, and resources on the new Adobe Community
Explore Now