2

This is something that pops up on my mind once a while when I browse around the web for art and desktop wallpaper, since I tend to see JPG and PNG as the common formats. I just had to ask to get it off my mind, hopefully I've posted in the correct stackexchange domain.

I'm sure many computer users who are aware that PNG is a lossless computer image format (doesn't lose quality) while JPG is a lossy format (losses quality).

After researching. I've found that PNG has been out since 1995 and the size of computer storage has drastically increased since then. Even if image resolution and file size increases, I'm sure anyone can store over 100,000+ PNG images on a single hard drive today.

Personally when I look for art. I make sure I get the highest resolution available as a PNG. I'm aware converting from JPG to PNG will still have the lossy image detail from being a JPG.

Nova
  • 23
  • 3
  • This question might be better on the [graphic design stack exchange](https://graphicdesign.stackexchange.com) (not positive though, so be sure to read their help section to see). – user1118321 Jul 16 '17 at 05:04
  • @user1118321 yeah it would fit on GD but im sure it can be here too. – joojaa Jul 16 '17 at 10:43

2 Answers2

5

I don't know if this is the real reason, but here's one possibility: because it's unnecessary.

It's easy to say "JPEG = lossy = bad", but JPEG doesn't just destroy image quality willy-nilly. What the format gives you is a slider with "small, low-quality" at one end and "big, high-quality" at the other. You can easily reduce the byte size of a PNG image by encoding it as JPEG, and if you use the high-quality end of the slider, you needn't lose any visual appeal. Although normal JPEG is lossy in the information-theoretic sense, a high-quality JPEG appears identical by the naked eye.

Many image hosting sites will replace images by lower-quality JPEG files not because of the storage cost but because of the bandwidth cost. If you're serving millions of views of these files every day, the cost of sending those extra bytes is pretty big, even though the cost of storing them is tiny. And those bytes don't just cost money: they also cost load time for your users on mobile networks. These sites will have targets for how long their pages take to load on slow connections, and reducing the quality slider ever so slightly makes a big total difference.

In summary, JPEG encoding can be lossless or lossy, and it can be as high- or low-quality as you want. Using PNG everywhere instead of JPEG would be costly for image sites and would make you wait longer for your art files to download. Choosing a high-quality JPEG file can give you something that looks just the same as the PNG without being as "heavy".

Dan Hulme
  • 6,600
  • 1
  • 15
  • 35
  • Size of file can be also quite expensive imagine your image gets downloaded a 10 million times due to getting popular then the difference between a 2 mega file and a 400kb file is 1700 \$ vs 340 \$ (using aws pricing) – joojaa Jul 16 '17 at 17:44
  • S3 is currently ~\$0.023/GB, so \$450 vs \$90.. Not that I would still want to pay \$360 for nothing (: – JarkkoL Jul 16 '17 at 19:49
4

Lossy does not necessarily imply any major quality loss. It is mostly dropping out meaningless information of the image in favor a much smaller image file. The amount of quality drop can be adjusted, and in best case scenario this is done so that the quality drop is just invisible.

In exchange for this quality drop you get quite big file size savings. And for most part the quality drop just makes reusing the image for future edits harder. While this may sound bad, its actually a good thing for the author. The original author will store a master file that has not been compressed, thus making it harder for others to reclaim your work.

Also quite many times the image starts its life as a JPEG, as quite many cameras only allow output of JPEG files, because the other option is HUGE files.

Now it should be mentioned that JPEG only works well for photographic content. For synthetic images like logos PNG fares much better than jpeg in because the image has less variation. Also PNG does not guarantee lossless compression as you can preprocess the image for some compression gain, and often do so.

joojaa
  • 8,287
  • 1
  • 22
  • 46