Read our Photoshop articles to find the latest news, tips, tricks, techniques and developments in graphics editing. Learn from experts how to maximize your Photoshop tools.  Home Photoshop Articles PNG and Alpha Transparency

PNG and Alpha Transparency


Transparent GIFs have been a great success for use on the internet (spacer.gif anyone?). The support for transparent pixels in addition to other advantages, makes GIF a great image format. There are, however, a few disadvantages compared to other formats (such as PNG); it only supports up to 256 colors, pixels are either transparent or not - nothing in between is possible, and the level of compression on multi-colored areas (such as real-world photos) are very low. PNG on the other side, supports plenty of colors (24bit) and partially transparent pixels. The level of compression are, however, not the best.

In this tutorial, I'll demonstrate how you can use transparent PNGs to create great looking effects for use on the web. But be aware that there are one browser today that lacks the support for alpha transparency, can you guess which one? Yep, Internet Explorer. Thankfully, the developers of IE7 have implemented full support for it.

To demonstrate the effect, I'm going to use a picture of an object, in this case a closeup of a USB plug, give it a bit of shadow, and then place it on top of a block of text.

The image I used looks like this:

image 1

As you can see it's a 400x240 px canvas with a transparent background. The USB plug itself is on a separate layer which I then gave a shadow by double-clicking the layer to open the Layer Style box and using the setting as shown below:

image 2

When you're satisfied with the way it looks, go to File > Save for web. The only thing you need to do here is to select PNG-24 from the list of presets and make sure Transparency is checked.

PNG and Alpha Transparency

A demonstration

As mentioned before, I've made a demonstration of this effect. With a single paragraph of lipsum and the image of the USB plug positioned on top of the text.



Author's URL: Epleweb
Final results of our readers
New!
Passed through all the steps? Share your result!
Your result will be premoderated.
Please make sure you choose the right image.
 
 



Captcha

*Required fileds
Read our Photoshop articles to find the latest news, tips, tricks, techniques and developments in graphics editing. Learn from experts how to maximize your Photoshop tools. More Articles: Featured Materials | Fresh Materials | TutorialKit New Photoshop Tutorials

Reader's comments
comments Christine October 08, 2011 says:
I will be creating some icons and graphics for Ipad apps and in reading the specifications, although Apple requests to use png files, they also state to NOT use alpha transparency...
I believe they mention 8 bit...

So, in my quest to discover what alpha transparency is, I ran across this site. I use 24 bit png files for web all the time, but don't think about or know what alpha transparency really is...

Any input or feedback on this? Here are the specs from Apple in a nutshell...

Ensure your icon is eligible for the visual enhancements iOS provides. You should produce an image that:

Reply
Add comments to "PNG and Alpha Transparency"

Captcha