Invisible PNG image layer that is only visible as a background

I'm guessing it's what was called "Dirty Transparency" in this article from Smashing Magazine.

Essentially any color in transparent PNGs can be described by an RGBA value, where RGB stands for the Red, Green and Blue channels and A stands for Alpha. The "invisible" colors can have any RGB values + 0 Alpha, meaning that the color will retain the original information, but render as transparent because its alpha is set to 0.

Why would you want to store the RGB values when Alpha is being used? So you can get smooth edges and transparent colors—unlike jagged edges in transparent-background GIFs. Transparency in PNG can go from 0 to 255, in GIFs it's either 100% transparent or opaque. To render something at, let's say, 50% transparency, you'll still need to know the RGB values, hence the value is stored. Most image editor software discard that RGB information when saving a fully transparent color, Photoshop included.

I can't speak for CC versions, but to see the "invisible" colors in older Photoshop versions you'll need a plugin. Pick one: Photofreebies or SuperPNG. SuperPNG seems more recent and less cluttered.

Why does the trick work? Wallpapers must be opaque because there's nothing "behind" them to show through, right? My guess is that Windows discards the Alpha channel information, revealing the hidden RGB values in the process.


To add to Nihal's answer, this can be reproduced by using the "anti-erase" brush in the GIMP. The Erase brush can add or remove an alpha channel if the image is using a format that supports it, (hold Alt to swap between erasing and anti-erasing).

For Krita, you can do this: Layer > Split Alpha > Alpha into Mask. After doing that you can hide or delete the Transparency Mask 1 channel that was just created and you'll see the full image.

Since the Windows background can't have anything behind it, it's probably just stripping out the transparency and displaying the image without it, (quick and dirty 32 bit image to 24 bit from the looks of it).


One point of clarification: This is not a bug, it is specified behavior in the png specification. Specifically the specification states that if a viewer or converter cannot understand transparency or transparency is not appropriate for a context or use the alpha channel may be ignored. Further the specification calls for all image generators to set the transparent colors so that the image is useful if the alpha channel is ignored. (my paraphrase, I has been a couple years since I read the spec.)