How to find the alpha channel transparency value of a pixel in a png image? [closed]
Solution 1:
In Photoshop's Info panel, you can choose 'Opacity' as a readout mode, though it will show up as a percentage and not as a real alpha value.
To enable it, simply open the Info window, choose Panel Options and then set the Second Color Readout mode to Opacity.
Solution 2:
Using Gimp, you can use the Color picker.
Press shift while clicking on a pixel.
(or tick Use info window
in the tool's options)
Once you click on a pixel, the Color Picker Information window
will pop up, showing you details including the alpha level:
Solution 3:
I found out a way to get the exact alpha value in Photoshop. The other solutions only get the closest integer percentage to the actual alpha.
- Create a black background layer (#000000).
- Duplicate the layer whose alpha you need, because we need to edit it. (Or if you need the composite alpha of several layers, duplicate them and merge them)
- Hide the original layer, so that only the black background and the new duplicate is visible.
- Click the new layer and then click "Lock transparent pixels" (The little checkerboard icon above the layers)
- Fill the layer (Shift+Backspace) with White color.
Now you have a picture containing the alpha values of the original image, in greyscale. Just use the Color Picker to select any pixel in the image, and get the exact alpha value (for example #7f7f7f means an alpha of 0x7f, or 127).