Is there a reason for iPhone to save screenshots taken as .PNG instead of .JPG?

Screenshots won't have transparent background anyways.


PNG is not only useful for allowing transparency: PNG is a lossless format, while JPEG uses a lossy form of compression. Also PNG does compress screenshots pretty well (unlike camera photos, which is why Apple uses JPG for those).

More info if interested:

enter image description here

Also, A technical overview of what PNG is good for is worth reading (it's basically one of the main references on the topic and contains enough details to spend the day on it). Excerpt:

For the Web, as of early 1999, there are two image formats with ubiquitous support: JPEG and GIF. JPEG is very well suited to the task for which it was designed--namely, the storage, transmission, and display of photorealistic 8-bit grayscale and 24-bit truecolor images with good quality and excellent compression--and PNG was never intended to compete with JPEG on its own terms. But PNG, like GIF, is more appropriate than JPEG for images with few colors or with lots of sharp edges, such as cartoons or bitmapped text. PNG also provides direct support for gamma correction (loosely speaking, the cross-platform control of image ``brightness'') and transparency. I'll discuss these in more detail shortly.

GIF was the original cross-platform image format for the Web, and it is still a good choice in many respects. But PNG was specifically designed to replace GIF, and it has three main advantages over the older format: alpha channels (variable transparency), gamma correction, and two-dimensional interlacing (a method of displaying images at progressively higher levels of detail). PNG also compresses better than GIF in almost every case, but the difference is generally only around 5% to 25%, which is (usually) not a large enough factor to encourage one to switch on that basis alone. One GIF feature that PNG does not try to reproduce is multiple-image support, especially animations; PNG was and is intended to be a single-image format only. A very PNG-like extension format called MNG has been developed to address this limitation.

  • 3
    Incidentally, the key difference between screenshots and camera photos is that screenshots are basically geometric shapes, and aren't "fuzzy" the way camera photos are (so a PNG-compressed photograph may well be larger than the original). However, to compress camera data well, some precision is lost, so you don't use it in the world of perfectly sharp lines and precise arrangement that is a screenshot. – cpast Dec 14 '14 at 3:44
  • 4
    Put another way, the key difference is in the patterns of variation in per-pixel data across photographs versus most rendered graphics. Rendered graphics typically contain regions of identical coloration and transparency, which PNG's repetition-oriented compression handles well. On the other hand, photographs exhibit continuous, complex variation across the image due to the complexity of the physical world they capture. There's virtually no repetition. So JPEG takes a different approach, embracing the variation by encoding the frequency space of an image, its Fourier coefficients. – Terry N Dec 14 '14 at 5:58
  • Nice show and tell. You def learn something new each day. – Muhnamana Dec 15 '14 at 22:52
  • 1
    This raises a valid point, and one that those of us who were doing web development in the 90s and early 2000's are only too aware of, but it remains that if you can only choose ONE format, PNG is usually best. Wrongly choosing PNG results in file sizes larger than necessary, while wrongly choosing JPG can result in larger files than necessary and/or a loss in quality. – Jon Story Dec 16 '14 at 14:07
  • @Franck, Citation needed for "PNG was specifically designed to replace GIF", – Pacerier Aug 19 '15 at 22:48

Because this:

PNG screenshot

looks a lot better than this:

JPEG screenshot

OK, so I had to crank the JPEG compression quality way down to make the compression artifacts that obvious, but the point remains — a PNG screenshot shows exactly what you see on the screen, whereas a JPEG screenshot is always a little bit lossy (yes, even if you crank the quality up to 100).

Besides, PNG tends to be pretty good at compressing images with large areas of flat color, sharp edges and repetitive patterns (like text). Thus, in many cases, a lossless PNG screenshot can actually be smaller than a JPEG screenshot saved at any acceptable quality level.

  • 5
    props for show rather than tell ! – japreiss Dec 14 '14 at 15:58
  • But here, the PNG is 4 times the size of the JPEG (33ko vs 8 ko). Maybe you should try to upload a JPEG of the same size than the PNG for true comparison – Thomas Ayoub Dec 15 '14 at 9:01
  • @Thomas: Here's a 35 kB JPEG for comparison. It's not nearly as bad as the tiny 8 kB one, but still has visible compression artifacts, such as gray fringing around the text. For the answer, though, I wanted an example where the artifacts would be obvious, even if your screen / eyesight was poor. – Ilmari Karonen Dec 15 '14 at 9:12
  • I understand but it's better to compare apples with apples, because if you bring carrots, then your nice answer become a semi-nice answer. Anyway, I voted you up for the visual example :) – Thomas Ayoub Dec 15 '14 at 9:17
  • There's also the point that we stopped caring about kilobytes a good decade or so ago: PNG is the best lossless compression we have, therefore it's usually the best choice unless space is at a premium. In the world of high definition video, a few kb on a photo isn't a concern anymore. – Jon Story Dec 15 '14 at 15:11

One of the functions of a screenshot is to show someone else a particular visual artifact you're seeing on your device -- perhaps to show a visual glitch to an app developer. In such cases, any compression artifacts could be a distraction from the actual issue under discussion; the screenshot needs to be pixel-perfect.

Thus, a lossless format like .PNG is mandatory.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .