Copy link to clipboard
Copied
Hi to everyone.
I did an action to work on a lot of files.
This action allow me to merge all layers, then create some new layers and after then i transform some of this it should save 2 different files in jpeg and tiff.
My hugest problem is that some of that files has some alpha channel saved, so, when i go to save the jpeg it ask me every single time the destination and it add me "copy" to the end of filename...
I'd like to know if there is any way to remove the alpha channel automatically before to save the jpeg...
I hope that i was understandable 😄
Thanks to all 🙂
Just use this script as an action statement, just before you save the file:
activeDocument.channels.removeAll();
You can also use this to remove paths:
activeDocument.pathItems.removeAll();
I had to sleep, however, it appears that overnight the code was posted. Here are some others:
// delete paths
app.activeDocument.pathItems.removeAll();
// delete alphas
app.activeDocument.channels.removeAll();
// delete layercomps
app.activeDocument.layerComps.removeAll();
// delete color samplers
app.activeDocument.colorSamplers.removeAll();
// delete guides
app.activeDocument.guides.removeAll();
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi r-bin – Yes, there are many "optional extras" to be found in a Photoshop file, some folk say too many :]
I have not had the inclination to try to remove all of these possible extras, however, I would certainly consider grafting more code onto this script to account for them if the code to do so was offered.
Copy link to clipboard
Copied
Bump... did my script work for you?