[b said:
Quote[/b] (scottychaos @ Sep. 29 2006,10:51)]what is the benefit of PNG avatars over jpegs?
nepenthes_ak's new avatar is nice and crisp and clear..looks great!
but its still 28K in size..pretty big for an image that small.
so what is the deal with PNGs supposed to be?
im confused..
scot
Most computer graphics are stored as a set of pixels, or dots that represent the image. Imagine drawing a grid over an image, and saying that each cell can only be one color. Each pixel has a number stored with it, listing how much of each primary color is included which tells the computer what color that pixel is. In effect, the computer can draw each of these pixels at the right color and give the illusion of a continuous image. Obviously, the more pixels you have, and the more space you use for color information, the more quality there is but the more data you need to store.
For instance, let’s say you use a 100x100 pixel image for an avatar. That's 10,000 pixels. At 24 bits per pixel to store color information that comes to a minimum file size of (10,000 x 24) 240,000 bits, which can also be stated as 30,000 bytes or 30kb. 30k is pushing it when you will be loading as many as ten of these on every single forum post, and if you want to use something larger like a 150x200 pixel image your file size will increase by 200%! So what we want to do is find a way to compress them; make them use less space while showing the same image
JPGs use what's called a 'lossy' compression, aptly named because it discards (or loses) some of the information in order to save file size. This results in more abrupt gradients and artifacts around contrasting edges. However, if the imperfections are small enough our eyes will glaze right over them. Even in these cases, however, some detail is lost and the image tends to appear a little less clear and less vibrant. This especially becomes a problem with smaller images such as avatars or signatures.
GIF files use what's called a 'lossless' compression, which means that no information is discarded at all. Insisting on keeping all of your data means that the file will appear exactly like the original every time with smooth gradients, sharp edges, and no artifacts. However, it also results in a much larger file size as nothing can be approximated. To get around this GIF files are stored with only 8 bits per pixel of color information. This allows a massive reduction in file size, but decreases the available colors for any given pixel from 16.7 million to 256. Amazingly, most images still tend to look pretty good with this reduction in color depth, but photos tend to appear dithered and with sharp gradients.
PNG is similar to a GIF, but with two important differences. As noted above the compression algorithm is different and, in addition to being more open, provides better compression resulting in slightly smaller files. More importantly, PNGs allow you to save your files with 24 bits of color information per pixel if you wish. This results in a larger file size, but provides the maximum possible image quality of any format. This is a favorite of photographers and artists, as file size is secondary to image quality for us...er, I mean them.
The suggestion above is to save your file as a PNG-8, or a PNG file with 8 bits per pixel of color information. I would recommend saving as a PNG-24 if you have a photographic avatar, or simply using a JPG. The PNG-24 will provide maximum quality, but if it results in too large of a file a JPG would look infinitely better than a PNG-8 at the same file size (on most photographic images at least). Your mileage may vary, of course, so do your own testing.