Article View: adobe.photoshop.scripting
Article #557Re: delete all channels previously created by "save selection"
From: Paul_R
Date: Sat, 10 Jan 2009 20:33
Date: Sat, 10 Jan 2009 20:33
46 lines
1385 bytes
1385 bytes
You might like to try this John.
It does assume that the last 7 characters need to be removed.
#target photoshop
if(documents.length){
activeDocument.flatten();
activeDocument.channels.removeAll();
var saveFile = new File(decodeURI(activeDocument.fullName.fsName).slice(0,-11) +".tif");
if(saveFile.exists){
alert(saveFile +" already exists!");
}else{
SaveTIFF(saveFile);
}
}
function SaveTIFF(saveFile){
tiffSaveOptions = new TiffSaveOptions();
tiffSaveOptions.embedColorProfile = true;
tiffSaveOptions.alphaChannels = true;
tiffSaveOptions.imageCompression = TIFFEncoding.TIFFLZW;
activeDocument.saveAs(saveFile, tiffSaveOptions, false, Extension.LOWERCASE);
}
Technical Details
Message-ID:
<59b776ef.6@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!webcrossingReferences:
<59b776ef.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f5839,ad07083eeec92c34 X-Google-Attributes: gidf5839,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Paul_R@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.photoshop.scripting Subject: Re: delete all channels previously created by "save selection" Message-ID: <59b776ef.6@webcrossing.la2eafNXanI> Date: Sat, 10 Jan 2009 12:33:42 -0800 References: <59b776ef.-1@webcrossing.la2eafNXanI> Lines: 27 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit