Nando
8/13/2010 8:49:00 AM
Shotgun Thom wrote:
> Regarding the PNG file size differences... it all has to do with
> compression techniques. There are a bunch of tool/utilities
> (PngCrush, PNGOUT, etc.) out there that do nothing but compress
> existing PNG files. There's even an online site (www.punypng.com)
> where you upload your PNG and it will reduce it for you and send it
> back. Google PNG Compression Tools and you'll see the plethora of
> choices.
>
> The nice thing about all these compression tools is there, usually, is
> no loss of image quality. The API code uses a pretty standard png
> saving format. Other utilities/programs, obviously, have tweaked the
> compression. Kinda like the difference between WinZip, GZip and 7Zip
> compression. They are all Zip tools... just different compression.
Very interesting stuff Tom! Great site too (punypng.com).
I'm not planning to work on this, but I must sort my curiosity here :-)
I'm not an expert in file formats, my understanding is based mostly in
the common idea that an electronic image is just that, a 3D matrix of
dots (x, y, color) with that info as part of the file's header.
However, if there are so many tools around that offer different
types/levels of lossless compressions (and the files are still
backward-compatible for displaying in browsers and old editors) then
that implies these tools must be injecting the PNG file with the
*actual* code/algorithm that decompresses the picture. Which leads me to
the idea of a security vulnerability (right?). I'm not getting paranoid,
only curious. Is this the way PNG images are crafted?