Can I use PNG image for web ? What benefit of it?
Printable View
Can I use PNG image for web ? What benefit of it?
Yes you can use a .png image format for the web. To find out the benefits:
http://www.atalasoft.com/PNG.aspx
It is certainly worth switching to PNGs for anything but animations, but a couple of things do bear mentioning which that page missed:
- The GIF patent has expired in most places, and is therefore no longer an issue;
- Gamma correction can have rather nasty effects for Web images, and you're probably best off disabling it in your images (in the GIMP, simply untick the 'save gamma levels' when exporting as PNG);
- IE<7 have issues with PNG transparency, and require a rather ugly and somewhat limited JScript workaround;
- and, to end on a positive note, PNGs usually have a much smaller filesize than their equivalent GIFs. :)
I make almost all of my files (except for certain types:animations and what not) PNG's and I love it.
Ok, keep using it.
Ah, just to clarify: when I saidI was referring to usages in which GIFs are common. JPEGs have a separate niche, and are still the format of choice for distribution of images with a lot of colour detail, like photographs.Quote:
It is certainly worth switching to PNGs for anything but animations
PNG is awesome but in some of the old browsers the tranparent parts will appear with a background color instead.. I don't lnow this but i think it's PNG-24 only??
Yes, PNG-24 is the variant with transparency.Quote:
Originally Posted by myself
All PNG versions I'm aware of have transparency available, even if it is only single layer transparency as is available in GIF. It's the version(s) with alpha channel transparency (a method well suited to gradient opacity) that isn't supported in IE < 7, except via the alpha image loader filter (IE 5.5 and up only), and even then it works out quite differently than a normal image tag or background image would. As a result many folks resort to a script to handle the 'heavy lifting' of getting it to look like a regular image tag or background image. But the tags may be written out 'by hand' if one knows how. Regardless of how it's done though, the filter itself still requires javascript and 'safe' Active X enabled.
If your PNG image may be rendered adequately with 256 colors or less and only single layer transparency or no transparency, no filter is required in any browser, as long as you save it in the more limited GIF like PNG format that supports only 256 colors. Why do so? Why not just save as GIF? Because PNG can sometimes result in an image that requires less bytes than GIF.
Like many others, I tried a lot of different "transparent-png-scripts", but none of them worked just the way I wanted it. And then... I came upon this article about PNG8-transparency. Works great, and NO script needed! (Although you do need Fireworks...)