Skip to main content
scargut
Participating Frequently
April 1, 2020
Question

Converting grayscale image to transparent not working correctly

  • April 1, 2020
  • 1 reply
  • 5022 views

So I've been creating transparent pngs for years now in Photoshop - in every version since as long as I can remember. Here is how I've always done it:

1. Convert image to grayscale if it isn't already

2. Go to Channels and command-click the Gray layer

3. Invert the selection

4. Make a new layer and fill the selection with 100% black

5. Delete the background layer

So by doing this, I should be left with a layer that has nothing but a grayscale version of the image where all of the white is now completely transparent (I'll call it "grayscale layer"). So if I put a layer under that grayscale layer and fill it with 100% black, the image should look 100% black (since there is no white in the file anymore). If I fill that bottom layer with white, it should look like what I did when I started - 100% grayscale again. But for some reason now this method I've always used (or any other I try) leaves me with an image that looks like it's maybe 80% opacity overall. When I save the png, tho, it looks correct in the Finder preview. In fact, when I open the png or place it in any other program - Illustrator, Preview, Affinity Photo, Safari, etc., it looks correct. The only program where it looks wrong, is in Photoshop, where it was created in the first place. What is really weird is if I put a color, even 100% white, on a layer under the grayscale layer, it looks correct. Attached is a screenshot of the psd file showing white under just the left half of the grayscale layer so you can see what I mean...

You can see that the opacity of the transparent side on the right looks like it's maybe 80% opacity or so. But it's not. When I sample the deepest part of the black in that area, the file/info pallette shows it as 100% black. Even if it really were 80% opacity, why does it look like it's 100% opacity over the white on the left side? I'm on an iMac using Photoshop CC 21.1.1. But this is also happening in Photoshop 2019 as well. And it's not happening with just this image. I've tried many different images - some even years old - same issue. So I'm baffled. Anyone have any idea as to why this would be happening? This is a crucial component of what I do. So any insight would be greatly appreciated.

This topic has been closed for replies.

1 reply

c.pfaffenbichler
Community Expert
Community Expert
April 1, 2020

Instead of 

»4. Make a new layer and fill the selection with 100% black«

use Layer > New Fill Layer > Solid Color, then alt-click the Layer Mask ison in the Layers Panel to make it visible and selected and measure in the »white« areas – are they truly 0% K? 

 

Can you probide an oroginal image and the corresponding png? 

scargut
scargutAuthor
Participating Frequently
April 1, 2020

So crazy, but yes...the whites are truly white and blacks are truly black according to the file info. They just don't look it on screen. Below is the original jpg and png I made from it. They will look identical here, because again...anywhere outside of Photoshop it looks fine. But if you open the png in Photoshop, it will look like it's at 80% opacity. At least for me it does.

scargut
scargutAuthor
Participating Frequently
April 1, 2020

Here is a screenshot of what that same png looks like in Photoshop. You can clearly see the checkerboard pattern through the blacks...