How to Choose an Image Format for Screenshots
The quality of screenshot images and illustrations used on your website do make a difference. You can use the good-old Print Screen key or any of the professional screen capture tools to grab your screenshots but the more important factor is that the output image should be sharp and that the file size be well within a reasonable limit.
The three most popular image formats for sharing screen captures on the web are PNG, JPG (JPEG) and GIF. There are other image formats like SVG and BMP but JPG/PNG/GIF are the most widely supported file formats and they can be rendered across all email clients and web browsers.
Here’s a quick guide to help you decide the right image format for your screenshots. It really depends on what you are trying to capture and where you are trying to embed that capture.
If you are capturing a web page that has lot of text - like snippets of source code or Google search results pages or even a tweet - use the GIF or PNG format. The screenshots will be clear (JPEG adds grains or noise around text) and file size remains pretty low.
If you need to screen capture a program window on your screen, dialog boxes, splash screens or Google Maps, use the PNG format. The advantage with PNG is that it preserves all the colors and yield a much sharper output when compared with JPG. See this Photoshop splash screen for a comparison between JPEG and PNG quality.
The PNG format is also recommended for capturing web pages, logos and line art.
If you capturing a frame of a YouTube video, video games, Flash animations, desktop wallpapers or photographs (like Flickr) or scene from a DVD movie, go with the JPEG format and not PNG because the file size would be significantly smaller without much degradation in the quality.
To give you example, this Wall Strip video on YouTube would take around 92kb when saved in PNG format but that would fall to 20kb if we changed the format from PNG to JPG. Surprisingly, there isn’t any remarkable difference in quality.
To summarize, use JPEGs for photographs and places where you need the file size to be relatively small, GIFs where the screen capture includes solid colors or where you need animation and PNG for text or for preserving transparency.
Google Developer Expert, Google Cloud Champion
Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.