Recently I ran into a conundrum while I was working with an image in Photoshop. The image was partially transparent, and I wanted to find how transparent it was. I also wanted to make it more opaque. Using a bit more exacting terms, here's what I needed to do:
1. I wanted to find how transparent the pixels were. In other words, I wanted to find out the percentage value of opacity of the pixels.
2. I wanted to remove the transparency so that image was 100% opaque.
It wasn't as easy I thought it was going to be—to find the information, that is. I consulted Photoshop's official help documentation. I could find nothing useful by looking in the index under "transparency" or "opacity."
So off I went, doing a search on Adobe's support site. No luck there. Then off to do a series of Google searches. I used all sorts of word combinations: measuring opacity, determining opacity, measuring transparency, determining the percent opacity of a pixel, pixel opacity, pixel transparency, and at least a dozen more. I did find some information on removing transparency, and I'll come back to that, but after extensive searching, I could find nothing on determining the opacity of a pixel.
In fact, in some forums, one or two poor souls had posed the question: how does one determine pixel transparency (or opacity) in Photoshop, and after some weak responses, they eventually concluded that it was not possible. Impossible?
Nope. Indeed, it is possible. You darn tootin' it is possible!
I finally stumbled upon the answer in Photoshop itself. Purely by accident, I might add. Since it was so hard to find, I wanted to pass on it on to others who might be having the same problem that I had.
I know this works in Photoshop CS4 and CS5, and the following information is oriented to those versions. If you are using a previous version, you'll need to check to see if the feature is available.
Finding out the Opacity (or Transparency) of an Image
Actually, what you can find out is the opacity of a pixel, not the entire image. Some images might have varying amounts of opacity. But if a transparency has been applied equally to the entire image, then once you find out the opacity of one pixel, you know the opacity of the entire image.
Here's how to find the opacity of a pixel:
1. If you have the "Info" panel showing on the Photoshop screen, you'll have the preliminaries out of way. If not, you can show the "Info" panel by selecting Window >> Info from the menu. So start by having the "Info" panel show on the screen (shown below).
2. You probably know this, but "Info" panel allows you to use your cursor to point to pixels on the image, and you'll be able to see color values of that pixel. If you have an RGB image, it tells you the levels of R (Red) G (Green) B(Blue).
3. But you can also see the opacity level. Opacity, however, doesn't appear in the "Info" panel's default configuration. To see opacity, it's a matter of turning it on.
4. To turn it on, click on the down arrow on the upper right hand corner of the "Info" panel. From the menu that appears, select "Panel Options."
4. From "Second Color Readout" on the "Options" dialog box, select "Opacity." Click OK.
5. Now you'll notice that the "Info" panel includes the heading "Op:" on the upper right (see image below). Yep that's right, it mean "Opacity."
6. Place your cursor on the image, and drum roll…the percentage of opacity appears under "Op." In this the example screen shot (just above), it's 93% opacity. (Or, looking from another angle, it has 7% transparency.)
Now you can determine the opacity of any part of the image. Sheesh. It wasn't hard it all. Just finding the information, that was the hard part.
One Note About the Info Panel and Layers
I want to add something here. If you have a series of layers, and the layers have different opacities and different blend modes, the Info Panel gives you the average opacity of all the layers together. That holds true for the color values as well. You really have to go digging to find that out. In fact, the way I found out was by good ole trial and error. What this means is if you need to find out the opacity (or color values) of a certain layer, first turn the other layers off, then use the Info Panel.
Reducing the Transparency of an Image (Increasing the Opacity of an Image)
I wanted to follow the above information with instructions on how to reduce the transparency of an image—or, in other words, how to increase the opacity of the image. You can find this information in a couple of locations the web, but it is usually described so briefly that you may have difficulty deciphering it. I'll describe it here in a bit more detail and include some screen shots to boot. (What a nice guy I am! Send me flowers. No, send me money! No, really, flowers are fine.)
1. Make sure the "Info" panel is showing. (See instructions, above.) This allows you to watch as the opacity level increases. In the example screen shot shown here, the image is starting out at 93% opacity.
2. Also, make sure that the "Layers" panel is also showing. If it's not, select Window >> Layers. (The Layers panel is illustrated below)
3. On the Layers Panel, right click on the desired layer. (On the screen shot to the right, I'm right clicking on the "Pretty Woman" layer.) From the menu that comes up, select "Duplicate Layer."
4. A dialog box will appear, click on OK to create the new layer.
5. In the Layers panel, the new layer will be automatically selected. Right click on it and from the menu that appears (shown to the left), select "Merge Down." This means merge with the layer beneath. So in other words the newly created layer will merge with the original Pretty Woman layer.
6. Now take a look at the Info panel (below). You'll see that the opacity percentage has increased. In my example screen shot, it has increased from 93% to 100%. That means we're there. No more transparency left.
However, the opacity may not increase to 100%. For example, if I started with 75% opacity with the Pretty Woman image, the first time through, it will increase to 97%. To bring it all the way up to 100%, I would need to run through the procedure (steps 3 through 5) above once again.
If I had started from an even lower percentage opacity, I would have to run through the same procedure three or more times. But eventually I could remove all transparency and have a completely opaque image. And that's what you'll need to do if you are trying to achieve 100% opacity: run through the above procedure as many times as necessary until the "Info" panel shows 100%. Yeah!
One last note. You can change the opacity of one or more parts of the image. Do that by isolating one or more areas on the image by use of a selection. Copy the selected area. Then paste the selected area. When you paste the selected area, it creates a new layer. At that point, go to your trusty "Layers" panel and merge the newly created layer to the original layer. Use the "Info" panel to check the opacity in the isolated area. If you need more opacity, repeat the process.
I hope this has been helpful. Happy photoshopp'n!
Keywords: photoshop opacity, photoshop transparency, photoshop opacity of a pixel, photoshop transparency of the pixel, determining the opacity of a pixel, measuring the opacity of a pixel, determining the transparency of a pixel, measuring the transparency of a pixel, reducing transparency in a photoshop image, increasing opacity of a photoshop image.