Skip to main content
Inspiring
April 4, 2022
해결됨

Scripting. get the number of pixels in the alpha channel of an image layer ?

  • April 4, 2022
  • 4 답변들
  • 894 조회

Hi guys.

Someone tell me how I can get the number of pixels in the alpha channel of an image layer ?

이 주제는 답변이 닫혔습니다.
최고의 답변: r-bin

Algorithm (the hint).

Turn the transparency channel into a selection (ctrl+click on layer )

Save it to new alpha channel.

Select only this alpha channel.

Read the document's histogram value at index 255.

 

4 답변

r-bin답변
Legend
April 4, 2022

Algorithm (the hint).

Turn the transparency channel into a selection (ctrl+click on layer )

Save it to new alpha channel.

Select only this alpha channel.

Read the document's histogram value at index 255.

 

AnyON작성자
Inspiring
April 4, 2022

Thank you, r-bin...

Kukurykus
Legend
April 4, 2022

That seems to be solution - mark it as correct answer if you think so 😉

Kukurykus
Legend
April 4, 2022

While you're back to forum, was the answer given in Photoshop Scripting. How to put each closed path on a separate Path layer ? that you were looking for?

AnyON작성자
Inspiring
April 4, 2022

Yes, I already use this knowledge.

Kukurykus
Legend
April 5, 2022
AnyON작성자
Inspiring
April 4, 2022

Someone tell me how can I get the number of pixels in the alpha channel of an image layer whose transparency value is 0.

Sorry///

Stephen Marsh
Community Expert
Community Expert
April 4, 2022

More information is required, ideally you can attach samples. Black, white or shades of grey?

 

I think that I recall a script for how many pixels in an irregular selection and one can load an alpha as selection...