Skip to main content
Inspiring
April 24, 2012
Question

Apply Black and White to a layer?

  • April 24, 2012
  • 1 reply
  • 689 views

Hi,

     I would like to convert a layer in to Black and White. I have done it manually, I have select it in the following:

Image Menu --> Adjustments --> Black & White.

     How do i apply the effect through scripting? Could you please guide me on this.

thanks,

Rajiv.S

This topic has been closed for replies.

1 reply

c.pfaffenbichler
Community Expert
Community Expert
April 24, 2012

Record the ScriptingListener code for the creation of a B&W Adjustment Layer, then use that and combine it with something like

app.activeDocument.activeLayer.merge()

or

app.activeDocument.activeLayer.grouped = true

to merge or Clipping Mask it to the underlying Layer.

Inspiring
April 24, 2012

I can't merge the layer with the Background Layer.

I need to get average of that layer.

Yes! I got it! Thanks!

c.pfaffenbichler
Community Expert
Community Expert
April 24, 2012

You wrote

I would like to convert a layer in to Black and White

so I assumed you want to change just one Layer to black & white.