Simple but … how to increase a pixel’s opacity ???

BS
Posted By
boarder_s_paradise
Sep 30, 2008
Views
5216
Replies
33
Status
Closed
Hi folks.
Anybody knows how to increase the opacity of a pixel (without altering it’s RGB values) ?

It’s just soooo BASIC that I fear I’m overlooking something incredibly obvious.

To make it really clear: I have a pixel with, let’s say with RGB=(48,33,57) and 25% opacity. How can I make a (48,33,57) pixel with 75% opacity out of that ?

I find, right after the brush tool, that’s the most obvious tool for Photoshop. I wonder, why this is missing !?? Most tools have their counterparts, like dodge/burn or sharpen/blur. So why does the eraser (decrease opacity) don’t have a counterpart (increase opacity) ??

Thanks so much.

((PS: And as I know the question will come: No, I don’t mean layer opacity. The layer has 100% layer opacity and 100% fill opacity.))

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

JJ
Jim_Jordan
Sep 30, 2008
Use a layer mask.

This is the typical non-destructive way of altering opacity in Photoshop. This will give you the counterpart to an eraser that you are seeking – – but the trick is to stop using the eraser.
BS
boarder_s_paradise
Sep 30, 2008
Thanks Jim. Of course I know layer masks. I use them whenever I can. But sometimes I work on source material with a transparency/alpha-channel, like a partially transparent .png etc. At this point it’s too late for a mask.

I just can’t believe that this most obvious tool doesn’t exist in Photoshop!??

Any workarounds? Or anybody who can recommend me another software which would help me in that regard ?

Thanks a lot!
JM
J_Maloney
Sep 30, 2008
At this point it’s too late for a mask.

The mask is there. Just ctrl-click on the layer icon (load selection… layer transparency), make a new channel and fill with white. Then you can use the peel off white filter <http://www.adobeforums.com/webx/.3bc34571> to regain your "original" RGB values (on the RGB layer).

Finally, apply the original mask you saved, and edit it as Jim describes. Obviously, you’ll have trouble guessing what color white/trans pixels were. In comes the art part.

J
BS
boarder_s_paradise
Sep 30, 2008
JMaloney,thanks so much for helping. I’m halfway through your steps. Your first part is basically the same as ctrl-click the layer and save the selection.
I still have to read through those third party filters … With the function PS provides itself, this is not solvable ?
JM
J_Maloney
Sep 30, 2008
In place of running the filter: you could duplicate the layer 4 times, merge them, duplicate 4 more times, merge them, 4 more times, merge them, etc. I think I did 4 iterations of five and then duplicate number two on round five was done (all pixels either fully opaque or trans). I have no idea about the math on this. None. But its actionable! 🙂

The filter (Alphaworks for PC) is freeware, tho… I’m kind of assuming it works like Peel off white on the Mac…

J
JR
John_R_Nielsen
Oct 1, 2008
You can access tranparency directly in Photoshop, via the Filter Factory, which ships with Photoshop, but is not installed by default (it’s in a folder called ‘Goodies’ on the ‘Extras’ disc, IIRC).

Select which pixels you want to affect, and run the Filter Factory (it’ll be under ‘Synthetic’), using the value in the ‘A’ field to control the transparency. You can use a simple numeric value, or a formula, such as "a<128?128:a", which sets the transparency (opacity, really) to 50% if it is less than 50%, otherwise leaving it as is.

There is an important issue with a "Feature" of Photoshop’s transparency: if, by any means, a pixel has been set to completely transparent (the value in its Alpha channel equal to zero), its original color value will be stripped out, and replaced with the current Background color, which will be seen when opacity is restored.
BS
boarder_s_paradise
Oct 1, 2008
Wow, J Maloney and John R Nielsen, what you are saying is gold for me!

J Maloney, your approach is so simple but yet so creative. Incredible! I’m sure it works. How do you know actually that all pixels are 100% opaque ?

John, thanks so much for your directions. Seems very promising. Thanks also for the warning you issued. Is the "Filter Factory" you are talking about the same as this here: <http://www.photoshop-filters.com/html/filter_factory.htm>
?
JM
J_Maloney
Oct 1, 2008
How do you know actually that all pixels are 100% opaque?

I don’t think it would be too hard to over-merge and assure that all transparency values have been killed off. But you’re right, there’s got to be better way. I’ve had many bosses roll their eyes at my "creativity". 😉

Thanks, John.

J
BS
boarder_s_paradise
Oct 1, 2008
Unless the bosses have a better solution, they shouldn’t roll their eyes, me thinks 😉

OK, I see, so you decide visually if you are done or not. Actually, I’d love to have a transparency channel for the pic, so that when you click on it and the whole picture turns white, you know that all pixels are 100% opaque. It would be so easy for Adobe to implement this. Wonder why they don’t deem it helpful/necessary ?
JR
John_R_Nielsen
Oct 1, 2008
Select>Load Selection>Layer Transparency. Quick Mask mode. Check the Histogram.
BS
boarder_s_paradise
Oct 1, 2008
Hm, I tried that, but I couldn’t see anything significant in the histogram. I’m sure there’s something I’m not doing like I should …
BS
boarder_s_paradise
Oct 1, 2008
Dear J Maloney, I still can’t believe that I didn’t find a solution as easy as yours. Hats off!

I also tried to carry out the other method you described. I’m afraid I didn’t fully understand the idea.
OK, I have a layer with opaque and semi-transparent pixels on one layer and a transparent background layer. Now I ctrl-click the layer-icon. Then, if I create a new channel, I choose "color indicates: selected areas". A new channel appears, which is completely white everywhere (so it doesn’t include the selection I had just made), is that what you wanted me to do? Your link features the "peel-off-white-filter" and "alphaworks". The link says alphawork has all of the peel-off-white-filter’s functionality, so I used that one, as I’m on WIN. I applied the filter to the layer with RGB channels active. There are 6 different methods in alphaworks, but nothing seemed to help me with this. So that’s the point, where I’m stuck basically, in case you have a minute to help me.

Thanks so much!
JM
J_Maloney
Oct 1, 2008
I just tried a layer with 1,1,1 as it’s alpha mask and it took 10 times of duplicate and merge to get it to 255,255,255. I would think 12 would be enough for an action.

J
BS
boarder_s_paradise
Oct 1, 2008
I see 🙂

In case you still find the time to tell me how to continue at the point I’m stuck at (see above), that would be chiefly cool of you 😉
JM
J_Maloney
Oct 1, 2008
see post 13…
BS
boarder_s_paradise
Oct 1, 2008
Sorry J Maloney, I didn’t see that you edited your post. Ah, I see. You save the selection beforehand and let it serve as a layer mask later on.

As I said, your method (duplicating repeatedly) from post #5 works great! But I got the impression, that you had another way of doing it (described in post #3), without the duplicating+merging part but using the "peel-of-white-filter" instead. Is this correct? And if so, could you tell us a bit more about how you did it? And thanks so much for having helped me out of trouble.
BS
boarder_s_paradise
Oct 1, 2008
John and J Maloney, considering Photoshop’s transparency issue (post #6), I thought you would be interesting in seeing this:

<http://img209.imageshack.us/img209/5981/screenyl3.png>

I have put a semi-transparent hair layer on a blue background layer. By repeatedly duplicating+merging (J Maloney’s technique) the hair layer, I get this result. The orange is part of the photograph’s original backdrop, but at the outer-limits you can see green, purple and pink artefacts (which were clearly not part of the original picture).

So either the duplicating+merging technique introduces some artefacts. Or Photoshop’s transparency issue is more complex than described in post #6.

Strange, strange … ?:
JM
J_Maloney
Oct 1, 2008
So either the duplicating+merging technique introduces some artefacts.

I don’t think it introduces them. I think it magnifies them. Remember, at the border of pin/tan and blue, you’re talking about 1% transparency. You can drop a layer on top using fibers (or just a solid color) in color blend mode to help de-fringe the hair.

< http://www.pixentral.com/show.php?picture=187jglYkXnh9pt44y8 c40t4iKtB6jw>
BS
boarder_s_paradise
Oct 2, 2008
Hm, what is pin/tan? Okay, sure 1% opacity, but in my view that’s no explanation for color artefacts. John said above that if a pixel reaches 0% opacity, then the RGB information is stripped. But as long as a pixel has *any* opacity value >0 than it keeps its RGB values unchanged.

So if I have a pixel with RGB=(120,48,99) and opacity=255 and then I decrease the opacity to 1, the RGB values are still (120,48,99), no matter what.
So, when increasing the opacity again, there is no reason for the color values to change.

But as we can see in the picture, some color values did change. So somewhere in the process color values changed. This can only have happened during the erasing or the duplicating+merging part. There is no other possibility IMO.

—-

Thanks for posting the screenshot. The hair was just a random picture I used for erasing. But I’m interested in your technique though … which unfortunately I didn’t understand, sorry. Especially why you use the color blend (as the color was okay before), but the rest is unclear for me, too… 🙁
JM
J_Maloney
Oct 2, 2008
But as we can see in the picture, some color values did change. So somewhere in the process color values changed. This can only have happened during the erasing or the duplicating+merging part. There is no other possibility IMO.

I just did some tests and don’t think it happens in the erasing or dup+merge part. There’s a lot of dithering in your blue. If you saved this file as a JPG, that would explain it, etc. Maybe post more PNG files and we might get to the bottom of it.

As far as the color blend goes: I’m a little unclear what you’re trying to do with all this. I assumed you’d received a pic like the one you posted with a bad mask — i.e. the hair was cut out poorly and you were trying to fix it. If the pink fringe around the hair was your (new) problem, you can eliminate that fringe by using another layer in color mode, filled with a color you’ve picked from the hair. As you see, it kills of quite nicely the pinK/tan fringe, making a new, more realistic cutout/mask (done using channels, but by turning off the color blend layer, to maximize channel contrast) easier to implement.

J
BS
boarder_s_paradise
Oct 2, 2008
OK, I see your point now, concerning the hair, thanks for explaining. Just hang on a sec, I’ll try your dup+merge method with another pic and post the result here.

Just in the meanwhile: … "I don’t think it happens in the erasing or dup+merge part". –> so when does it happen then? (In my original picture there were none of the artefacts you can see in the picture I posted here!)
JM
J_Maloney
Oct 2, 2008
(In my original picture there were none of the artefacts you can see in the picture I posted here!)

I think they’re there:

< http://www.pixentral.com/show.php?picture=1uXe7BIVRj59nnEnnu uUmiTkhFRh80>
BS
boarder_s_paradise
Oct 2, 2008
Uhm, you have the version I "unerased".

What I was trying to say is that there were NO green+pink+purple artefacts in the original picture, i.e. before I did the erasing. So they must have appeared thereafter.

Anyway, I tried it with another pic, and this time it worked flawlessly. I’ll post them in a sec.
BS
boarder_s_paradise
Oct 2, 2008
OK, here we go:
(1-> original image, 2->partially erased image (+screenshot of partially in PS), 3-> reconstructed image, 4-> filtered)

<http://img407.imageshack.us/img407/2985/1originalkg4.png> <http://img518.imageshack.us/img518/5301/2erasedoq2.png> < http://img526.imageshack.us/img526/9769/2erasedscreenshottw4 .png> < http://img201.imageshack.us/img201/4777/3reconstructedua2.pn g> <http://img505.imageshack.us/img505/3485/4filteredrg5.png>

It took me really a long, long time, easily >100 reiterations (but I regrouped and duplicated groups, so it was only a couple steps).

IMG#3 is what I get as a result of your method. I duplicated it some more times, but that’s really the max you can achieve.

IMG#4 is what I get if I further apply a special PS filter to #IMG3. Somehow it get’s some color information out of the pic, that cannot be restored with your method. Just compare the two pics. IMG#4 has – admittedly – some pixels that are only calculated (interleaved), but there are other pixels which clearly have "true" RGB values, that are missing in IMG#3.
JM
J_Maloney
Oct 2, 2008
It took me really a long, long time, easily >100 reiterations (but I regrouped and duplicated groups, so it was only a couple steps).

Duplicate, merge, duplicate, merge. Then it’s basically exponential, as opposed to linear (1+2+4+8+16 vs 1+1+1+1+1).

What’s your "special PS filter"? Overall, I’d say it looks great.

J
BS
boarder_s_paradise
Oct 2, 2008
The filter is Flaming Pear’s "Solidify"(http://www.flamingpear.com/goodies.html).

Any idea, why it can restore more pixels (and I’m not talking about the fake interleaved ones, see above) than your method ?

Also,
I still don’t understand your technique from post#3, which apparently does *not* use duplicating+merging but *another* way, right ?
JM
J_Maloney
Oct 2, 2008
Peel off white does exactly the same as duping and merging, if you use it on an already transparent layer.

Typically it’s used on file that’s been flattened to white, and peels it off, so you have (for instance) a drop shadow that is now transparent and can be placed over the color of your choosing.

J
BS
boarder_s_paradise
Oct 2, 2008
Ah okay, didn’t know that peel-off would work as duping and merging. That explains it then. Thanks a lot.

Anybody knows what John meant with:
"Select>Load Selection>Layer Transparency. Quick Mask mode. Check the Histogram." ??
JR
John_R_Nielsen
Oct 2, 2008
I meant that you will be able see if there are any transparent pixels left.

Only thing is, the histogram bars for 0 and 255 are right next to the boudaries of the box the histogram is displayed in, so they can be hard to see, especially when there’s no pixels at 1 or 254. So, some careful mousing-over may be in order to see if there are any at 0 or 255.
BS
boarder_s_paradise
Oct 2, 2008
Ah, I see now. Didn’t know that you could display alpha channels in the histogram, too. Thanks a lot!

And is this the "Filter Factory" you were talking about, John ? <http://www.photoshop-filters.com/html/filter_factory.htm>
AK
A_Kirk
Oct 3, 2008
This is off topic, but…

following this thread makes me VERY humble.

I’ve got a lot to learn…..

Al
JR
John_R_Nielsen
Oct 4, 2008
Those are filters made with the Filter Factory. A good overview of the FF can be found here < http://www.creativemac.com/2002/02_feb/tutorials/filterfacto rycomplete2.htm>. A very thorough guide for it can be found on Werner D. Streidt’s site <http://mitglied.lycos.de/filterfactory/>.

The FF is found on the disc "Content and Extras" that comes with Pshop. In CS1, which is the version I have at hand, it is in Goodies\Photoshop\Optional Plugins\Ffactory\.
BS
boarder_s_paradise
Oct 4, 2008
Great. Thanks so much for taking the time to gather all this info, you are the chief, John!

And thanks to both of you guys for sticking around with me here to try these things out, which apparently were helpful for others, too.

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

Related Discussion Topics

Nice and short text about related topics in discussion sections