What's new

Problem with PNG transparency


JeffK

Power User
Messages
391
Likes
522
hi all:

I was working on an OP request to cleaan up an image and make the background transparent.
Here's the original:

water pep original.png

I imported into PS, and using the blue alpha channel, created a mask.
Here's a screenshot of what the PS file looked like:
1605138283313.png

Background looks transparent, right? So I save it as a PNG.
But when I post the image to the site, the image displays with a gray background:

water pep final.png

When I open the PNG either back in PS or with a viewer, the background is transparent. So why does it display with a gray background? Is it a limitation of the browser? BTW - I'm using Firefox.
I didn't post the response to the OP since I didn't want to confuse the issue by showing a PNG that has a transparent background but doesn't display properly.
Haven't had this problem before. Maybe it's an issue with using an alpha channel as a mask?
Any insight and guidance would be most appreciated.

- Jeff
 

IamSam

Administrator
Staff member
Administrator
Messages
18,423
Likes
11,664
I downloaded your image and the background is not transparent. It has the color of R:196 G:197 B:199.
 

thebestcpu

Guru
Messages
1,638
Likes
1,464
Hi @JeffK
The embedded transparency is not totally transparent. Also, the colored portions are partially transparent as well.
The way you can check this is:
Load you PNG image
Use > Layers > Layer Mask > From Transparency
Select the Layer Mask Thumbnail while holding the Option Key (Alt Key on PC) which will bring up the Layer Mask for inspection.

As you can see the Layer mask is not totally black where you want transparency and not fully white where you don't want transparency.
You can fix the Layer Mask (e.g. Threshold Adjustment) and apply it back onto the image as one approach for a fix.
Hope this gets you going. Layer Mask shown below
John Wheeler

Screen Shot 2020-11-11 at 5.17.49 PM.png
 

JeffK

Power User
Messages
391
Likes
522
Hi @JeffK
The embedded transparency is not totally transparent. Also, the colored portions are partially transparent as well.
The way you can check this is:
Load you PNG image
Use > Layers > Layer Mask > From Transparency
Select the Layer Mask Thumbnail while holding the Option Key (Alt Key on PC) which will bring up the Layer Mask for inspection.
As you can see the Layer mask is not totally black where you want transparency and not fully white where you don't want transparency.
You can fix the Layer Mask (e.g. Threshold Adjustment) and apply it back onto the image as one approach for a fix.
Hope this gets you going. Layer Mask shown below
John Wheeler
Many thanks John. First time I tried using an alpha channel as a mask and I guess it should be buyer beware. :cheesygrin:
I'll go back in and rework - will let you know where I end up.
Thanks again to both you and @IamSam for the support!
- Jeff
 

Top