Question:
Should I use PNG-8 or PNG-24?
Olunde
2009-09-02 09:20:54 UTC
I'm trying to save some files with transparency for the web. I usually used GIF, but my brother recommended using a PNG instead. However, he said that one format is more widely supported than another.

If I am going to be saving images with transparency, should I use 8 or 24? I know 24 is larger in size, that doesn't concern me. I just want to make sure everyone will be able to see the image.
Four answers:
?
2009-09-02 11:16:14 UTC
go for the png-24 it will be just a little bigger but the picture quality will be just great



your brother told you a good thing in most case png gives better quality and size then other format



there will be no probleme with the support of png unless your use some very old browser
?
2016-12-17 00:18:46 UTC
Png 24
kunter
2009-09-02 19:54:59 UTC
dear olunde;



perhaps several MS Internet Explorer 6 related "incompatibility" issues might concern you. So, use of PNG24 isn't so free - it comes for a price. First some info; then



Portable Network Graphics (PNG) is a bitmapped image format that employs lossless data compression. PNG was created to improve upon and replace GIF (Graphics Interchange Format) as an image-file format not requiring a patent license (unlike GIF).



There were problems with the GIF format which made a replacement desirable, notably its limitation to 256 colors at a time when computers capable of displaying far more than 256 colors were becoming common. Although GIF allows for animation, it was decided that PNG should be a single-image format.



Though not asked, JPEG (Joint Photography Experts Group) can produce a smaller file than PNG for photographic (and photo-like) images, since JPEG uses a lossy encoding method specifically designed for photographic image data. Using PNG instead of a high-quality JPEG for such images would result in a large increase in filesize (often 5–10 times) with negligible gain in quality.



PNG is a better choice than JPEG for storing images that contain text, line art, or other images with sharp transitions. Where an image contains both sharp transitions and photographic parts a choice must be made between the large but sharp PNG and a small JPEG with artifacts around sharp transitions. JPEG also does not support transparency.



Up until IE7, there has been no fully native support for PNG alpha channel transparency in Internet Explorer. However, since IE5.5 there has been some support in the form of proprietary filter called the AlphaImageLoader. Please check the corresponding addresses in reference section.



We are accustomed to fix "transparent pixels problem" of PNG24's on the fly. In my webpage I have used one single PNG24 background but not PNG8 because I need to use a transitive opacity as well as perfectly smooth edges edging to transparent pixels:



http://kunterilalan.com/

p.s. in case you can't isolate the bg image:

http://www.kunterilalan.com/masterBG.png



best regards;
▐▀▀♦▀▀▌ ♦Oprah♦ ▐▄▄♦▄▄▌
2009-09-02 09:28:26 UTC
PNG24 supports millions of colors.

PNG8 only supports up to 256 colors.



That's why PNG8 files are so much smaller. If your images look OK in PNG8, use it. If the colors look grainy, use PNG24.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...