By CATAdvanced Cash

All 16,777,216 RGB colors in one PNG file – PNG format shows superb lossless compression

A while back, having nothing better to do with my time, I tried to create an PNG image with all the RGB colors. Yes, that’s right. All 16.8 million colors in one PNG file.

This little show of lunacy turned out to be a great demo of the powers of the PNG image format: The graphic, being 16.8 million pixels (4096 x 4096) and 24 bit color, ends up a modest 50 MB if uncompressed. But the PNG format produces a 58.0 KB file, wow!

Before you take look at this truly colorful piece of art, I warn those with slower computers. Don’t let the lightning fast download speed trick you – the PNG graphic packs quite a punch to the CPU if you’re on something real slow like 400 MHz.

All 16,777,216 RGB colors in one PNG file

I created another version of the ordered image, with the squares laid out along the diagonal of the image instead. This one (78 kB) didn’t compress quite as well as the first one (58 kB).

All 16,777,216 RGB colors in one PNG file - diagonal

Leave a Comment


*


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>