Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deciding which image format to use

I'm working on a web application that will allow users to upload profile pictures (avatars, basically). These images will be no bigger than 100 x 100 pixels and will be pictures of peoples' faces.

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

Edit

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

like image 465
Chris Avatar asked Dec 10 '22 19:12

Chris


1 Answers

For faces, JPEG is your best bet. Even a relatively high quality JPEG image will be significantly compressed relative to the alternatives.

The JPEG format (and the way its compression works) was designed for "natural" images like photographs. (The alternatives, primarily GIF and PNG, work better for computer graphics, diagrams, etc.)

All that said, you should try it. Take a couple of example photos, convert them to the various image formats, and see how they compare (with apologies for the subject matter! 8-)

JPEG, 6,668 bytes:

alt text
(source: entrian.com)

PNG, 31,651 bytes:

alt text
(source: entrian.com)

like image 110
RichieHindle Avatar answered Dec 28 '22 13:12

RichieHindle