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

Сonvert all open files to black and white

Community Beginner ,
Dec 27, 2021 Dec 27, 2021

Copy link to clipboard

Copied

Hello,

I have a question:
Is it possible to write such a script using JS:

In PS: I have to convert all open files to black and white images (desaturate)

I would be very grateful for your answers.

Sincerely,
Niyetkhan
TOPICS
Actions and scripting , Windows

Views

264

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 1 Correct answer

LEGEND , Dec 27, 2021 Dec 27, 2021

 

dcmnts = [].slice.call(documents); while(dcmnts.length)
	(activeDocument = dcmnts.shift()).activeLayer.desaturate()

 

Votes

Translate

Translate
Adobe
LEGEND ,
Dec 27, 2021 Dec 27, 2021

Copy link to clipboard

Copied

 

dcmnts = [].slice.call(documents); while(dcmnts.length)
	(activeDocument = dcmnts.shift()).activeLayer.desaturate()

 

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 Beginner ,
Dec 27, 2021 Dec 27, 2021

Copy link to clipboard

Copied

Kukurykus
Thank you very much, great!
It works!

Sincerely,
Niyetkhan
 

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
LEGEND ,
Dec 27, 2021 Dec 27, 2021

Copy link to clipboard

Copied

Mark as correct solution to confirm that works 😉

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 ,
Dec 27, 2021 Dec 27, 2021

Copy link to clipboard

Copied

LATEST

@niyetkhan – I'm just curious, why desaturate? The reason that I ask is that desaturate is often considered the worst of the many ways to create a grayscale/black & white image. If it works for you, that is of course fine.

 

Conversions depend on the image content, what works well for one image may not be the best for all images. For automating among many images, this will often be a compromise. That being said, some compromises may be considered better than others.

 

EDIT: As an example, 5 base methods are included in the following script to create 20 variations, and there are surely more base methods available.

https://morris-photographics.com/photoshop/scripts/bw-variations.html

 

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