What is the difference between PNG and PNG8?


Question

I was wondering what is the difference between PNG and PNG8?

Is there any difference between PNG and PNG8 in image quality? Why would I want to use PNG8 over PNG and vice versa? Lets say I draw an image in Photoshop. Does PNG mean that I will get the same pixels that I drew in Photoshop 1 to 1?

1
1
8/27/2017 7:31:00 AM

The PNG specification only defines "png", which can come in a variety of different bit depths and color types (RGB, RBGA, Gray, Gray-alpha, indexed). The "PNG8" nomenclature is simply a convenient way of referring to an indexed (8-bit pixels) image. ImageMagick, for example, uses PNG8, PNG24, PNG32, PNG48, and PNG64, to identify 8-bit indexed with binary transparency, 24-bit RGB, 32-bit RGBA, etc. I'm not sure whether PhotoShop's definition limits PNG-8 to binary transparency or not. A PNG8 is limited to 256 palette entries, while a PNG24 can have 16 million different colors.

Chances are that this is a duplicate question, but it's easier to just answer than to search for dupes. I'll do that now...

OK there are 29 questions about PNG8 in this site, and 542,000 questions throughout StackExchange, probably mostly dupes of this one.

5
9/5/2016 12:12:00 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
^