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

Converting grayscale image to transparent not working correctly

  • April 1, 2020
  • 1 reply
  • 5073 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 2, 2020

CC 2017 is the oldest installed version I can start on this computer and it’s the same there. 

So which older version of Photoshop are you referring to? 

 

And why do you want to preview the image against the Transparency checkerboard anyway? 

 

«If the only answer is that "Photoshop displays transparency in it's own way", then that "way" is garbage now.«

Do the other applications display the png against a checkeboard background or against a solid color background?

 

Anyway, maybe this thread is of interest to you: 

https://feedback.photoshop.com/photoshop_family/topics/photoshop-background-transparency-composite-issue

 


That article helps a lot actually. Thank you. At least I know I'm building my files correctly and not losing my mind. It's clearly a Photoshop alpha preview problem - "broken" as the article said. Definitely an issue that needs solved.


I don't remember seeing this issue in any version of Photoshop before 2019. But perhaps I had "Desaturate Monitor Colors by 0%" turned on and didn't realize it? Perhaps I hadn't worked with images before where it was so glaringly obvious. I don't know.

I don't really care about seeing the checkerboard. I care that the file is built correctly. And without white under it, the transparency looks wrong. Therefore I thought my files were not built correctly. I sell these images and didn't want my customers to have issues. My brain just can't deal with it 🙂 But looks like I just need to accept that Photoshop displays transparency inaccurately, trust that my files are built correctly and move on.

Thanks for the extra effort in finding that article. It helped a lot.