Select an image format to use

I am working on a web application that will allow users to upload profile photos (avatars, mostly). These images will be no more than 100 x 100 pixels and will represent the faces of people.

We want to allow the user to upload different image formats, but we also want to convert them all to the same image format. What will be the best image format for size, quality, etc.?

Edit

In this case, size is more important than quality, but not by much.

+4
source share
3 answers

For individuals, JPEG is your best bet. Even relatively high quality JPEG images will be significantly compressed compared to alternatives.

The JPEG format (and its compression method) is intended for "natural" images such as photographs. (Alternatives, primarily GIFs and PNGs, work better for computer graphics, diagrams, etc.)

All that said, you should try. Take a couple of sample photos, convert them to different image formats and see how they compare (with an apology for the subject! 8 -)

JPEG, 6.668 bytes:

alt text http://entrian.com/Richie-128.jpg

PNG, 31.651 bytes:

alt text http://entrian.com/Richie-128.png

+12
source

I think jpg is best suited for avatars, i can't find transparency.

JPG will be approved for photos and will overdo it for graphics, but this is not a large overhead for 100x100

+1
source

With an image of such a limited size and taking into account profile photos, there will most likely be a natural image. JPEG is definitely the way to go.

PNG works great when transmitting a very repeating pattern. Computer graphics, such as screenshots, gradients. There are several filters that increase the efficiency of deflates, however, due to the rampant nature of PNG, you will almost never get the same compression ratio on these images.

+1
source

All Articles