help! save split channel

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

pfaffenbichler

help! save split channel

Post by pfaffenbichler »

I can’t reproduce the issue so you best trouble-shoot it yourself.

If you split the Channels manually do the resulting files have the full channel names as part of their names (even though they are unsaved)?

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

Mike Hale

help! save split channel

Post by Mike Hale »

I can't reproduce that issue either an Windows 7. I wonder if the problem is that the char used in the split need to be different for some languages.

When you split the channels manually do the new documents have a underscore "_" in the document name that separates the doc name and channel name?
roychen

help! save split channel

Post by roychen »

pls ATT
pfaffenbichler

help! save split channel

Post by pfaffenbichler »

When you split the Channels manually (»Split Channels« from the Channels Panel’s fly-out menu) how are the images named?

What does the screenshot you posted show?
Did you create/name the files manually and are they intended to show what you want to get or what you do get?
roychen

help! save split channel

Post by roychen »

1. i save file (d.psd) ....channel name is 4/5/6/1A/1B/2A/2B/3A...
2. i split channel (manually)...after plit channel (manually) file name is s.psd_1/s.psd_2/..../s.psd_8(display at ps windows)
3. i save file by input name (manually)...s_4.tif/....s_3A.tif
roychen

help! save split channel

Post by roychen »

pfaffenbichler wrote:Does this help?
Code: Select all// 2013, use it at your own risk;
#target photoshop
if (app.documents.length > 0) {
var myDocument = app.activeDocument;
var thePath = myDocument.path;
var basename = myDocument.name.match(/(.*)\.[^\.]+$/)[1];
var theNumber = myDocument.channels.length;
try {
// split;
// =======================================================
var idSplC = charIDToTypeID( "SplC" );
    var desc2 = new ActionDescriptor();
executeAction( idSplC, desc2, DialogModes.NO );
// save files;
for (var m = 0; m < theNumber; m++) {
var thisDocument = app.activeDocument;
var thisName = thisDocument.name;
var thisPath = thePath+"/"+basename+thisName.slice(thisName.lastIndexOf("_"), thisName.length)+".tif";
saveAsTif (thisDocument, thisPath);
thisDocument.close();
}
}
catch (e) {}
};
////// save tif //////
function saveAsTif (myDocument, thePath) {
// tif options;
tifOpts = new TiffSaveOptions();
tifOpts.embedColorProfile = true;
tifOpts.imageCompression = TIFFEncoding.TIFFLZW;
tifOpts.alphaChannels = false;
tifOpts.byteOrder = ByteOrder.MACOS;
tifOpts.layers = false;
// save copy;
myDocument.saveAs((new File(thePath)), tifOpts, false);
};


hi pfaffenbichler
this can use for photoshop cc and cs6 ok but cs5 don't use