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
dcmnts = [].slice.call(documents); while(dcmnts.length)
(activeDocument = dcmnts.shift()).activeLayer.desaturate()
Copy link to clipboard
Copied
dcmnts = [].slice.call(documents); while(dcmnts.length)
(activeDocument = dcmnts.shift()).activeLayer.desaturate()
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Mark as correct solution to confirm that works 😉
Copy link to clipboard
Copied
@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