• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

remove alpha channel during a batch

Community Beginner ,
Nov 23, 2019 Nov 23, 2019

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 🙂

TOPICS
Actions and scripting

Views

4.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , Nov 23, 2019 Nov 23, 2019

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();

 

 

Votes

Translate

Translate
Community Expert , Nov 23, 2019 Nov 23, 2019

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();

 

Votes

Translate

Translate
Adobe
People's Champ ,
Jul 13, 2020 Jul 13, 2020

Copy link to clipboard

Copied

to Stephen_A_Marsh
 
There are also annotations, count tools, ruler tool.
Maybe something else that I forgot ).
There may still be metadata for each layer.
 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 15, 2020 Jul 15, 2020

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 15, 2020 Jul 15, 2020

Copy link to clipboard

Copied

Bump... did my script work for you?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines