All About the PNG Format
by Lina Thorne • Updated · Posted in Photography
The PNG (Portable Network Graphics) format was developed to replace the outdated GIF format in the late 1990s. The main goal of its developers was to create a format that provides lossless compression, supports transparency and produces images with a wider range of colors than GIF.
PNG is a format that’s widely supported by various browsers, apps and software. It’s great for logos and images with text. Its popularity makes it the perfect choice for sharing and storing images. For this reason, apps to convert to PNG are rather wide-spread.
PNG format has following advantages:
- Transparency (Alpha Channel). A special channel that manages transparency is called the alpha channel. If you want to make bits of an image translucent or completely transparent as well as change the levels of opacity, there needs to be an alpha channel in your image. Alpha channel allows you to make pixels transparent. More to that, PNG format supports gradual transparency – unlike GIF. Naturally, it’s extremely useful if you want to design a logo, an icon or an image with transparent areas. For instance, if your logo needs to have a transparent background so you could easily add logo watermark to your images.
- Color Depth. PNG can handle various color depths, including indexed (8 bits per pixel), gradient (24 bits per pixel), and Truecolor (32 bits per pixel with an alpha channel). It means that your PNG images can be very detailed and of high quality.
- Lossless Compression. PNG format supports lossless compression, which means the image quality will be great no matter what. Plus, no information from your image will be lost. Thus, you’ll be able to restore your images if necessary. However, this comes with a bit of a cost – PNG images tend to have a slightly bigger file size than, say, JPGs. They won’t be drastically big, yet this is something you need to be aware of.
- Metadata Support. Your PNG images can have metadata – copyright information, camera settings, color profile, when the image was created and more. This kind of information about an image can be useful. What’s more, if you include the copyright info into your metadata, it can provide an extra layer of safety.
- Animation (APNG). PNG format itself doesn’t support animation. But there’s a file format that’s kind of an extension of PNG. It’s called APNG (Animated Portable Network Graphics). This format supports animation as well as transparency and has the same advantages as PNG.
PNG format also has its drawbacks:
PNG format is not suitable for images with lots of details. In other words, it doesn’t handle photos all that well. So, if you are a photographer, you’ll have to save your images in JPGs; even though it’s a lossy format. PNG is often used for images with flat colors, text, line art, or images that need to have transparent areas.
Where PNG Format Is Used
Thanks to all the advantages listed above, the PNG format is utilized in various fields. Here are a few examples:
- Web Design and Graphics: PNG is extensively used in web graphics, due to the fact that it supports transparency and offers high image quality. It’s perfect for logos, icons, buttons and other elements of a website.
- Graphic Design: PNG is a popular format for professional graphic design work, especially when transparency is needed, or images contain text and very detailed elements.
- Icons and Logos: If you need icons and logos for an app or a website and they should have transparency and high resolution, then it’s better to save them in PNG.
- Medical Imaging: PNG is used for storing and sharing medical images, such as scans, due to the fact that it’s of high importance to preserve details and color accuracy.
- Presentations and Documents: PNG can be used for images in presentations, reports, and other documents where you need to have clear and sharp images as well as have the option to make the background transparent.
- Geographic Information Systems (GIS): In GIS, PNG can be used for images with cartographic data as this format supports various color levels and can display fine details accurately.
- Photoshop and Graphic Editors: You can save your images in PNG in various graphic editors, including Adobe Photoshop. This is due to the fact that this format can handle layers, transparency and other key elements of graphics projects.
When You Might Need to Compress PNG
Here are several reasons why it’s worth considering to compress PNG images:
- File size reduction. Image compressor can downsize PNG files by up to 70% without significantly compromising image quality. The pixel dimensions of the image will stay the same. As another option, you could try to resize PNG.
- Faster loading of visual content. PNG images that are less in size will load more quickly on websites, which may improve both SEO and user experience.
- Less bandwidth usage. PNG files of a smaller size will consume less bandwidth, saving you money on hosting.
Advanced Methods to Compress PNG Images
Apart from the basic compression methods mentioned above, other sophisticated approaches may be employed to reduce the size of a PNG file.
A lossy compressor is one of the best advanced methods. By deleting some of the image data, it can drastically reduce the file size. It’s crucial to remember that lossy compression can also negatively affect image quality.
A more sophisticated PNG format compression method is adaptive quantization. Adaptive quantization quantizes the colors of an image in a way that is best suited for that particular file. This can result in considerable file size reduction without sacrificing too much of the image quality.
When You Might Need to Convert PNG to JPG
Surely, PNG has its own advantages. This format is great if transparency support is required. It can be a perfect choice if an image contains some text and a lot of sharp lines – you will get much better results with PNG than with JPG. However, there are quite a lot of cases where converting to JPG might be not only preferable, but highly crucial. Here are several reasons:
- Smaller file size. The file size of JPG images tends to be smaller than of PNG images. You can see that if you compare one and the same image with the exact same pixel dimensions, but one file is in JPG and the other is in PNG. You will see that the PNG is bigger. You might need an image to have a smaller file size to meet the size limitations of a mail service or a messenger. Another example is if you need to post an image on a website. Your image will load faster on a webpage if it has a small file size. It will save bandwidth and improve your website’s performance.
- Disk space. Since PNGs have a bigger file size, they will take up more memory of your device. If you constantly face the problem of running out of memory space, it might be a good idea to convert PNG to JPG. This will help empty some disk space.
- Quality preservation. Even though JPG is a lossy format, if you use the right settings, the loss of information during compression will be minimal and you’ll be able to retain high image quality. This might be especially useful for converting photos and other types of images that have a lot of fine details and complex textures; you might’ve noticed that in most cases, they become less sharp and clear after compression.
- Compatibility. This is probably one of the most common reasons to convert PNG to JPG. Naturally, a lot of modern browsers, software and apps tend to support PNG. However, this format is nowhere nearly as popular as JPG, which is supported by practically all devices, operating systems, social media platforms, etc. For instance, Instagram advises its users to post images only in JPG.
- Ease of use. Since JPG is widely used and tends to produce images of a smaller file size, this format is more convenient for data exchange, editing photos and sharing them online.
How to Crop Images in PNG Format
Cropping photos is a tool that is powerful, yet often underestimated. It can considerably improve your image or make it even worse. This is why you need to learn some basic rules.
Here are several recommendations on how to crop PNG files to get the best results:
- Determine your goal. Before you start, think about what you want to achieve with cropping. Do you want to improve the overall composition? Put more emphasis on the main subject? Remove distracting elements?
- Use the rule of thirds. Place key elements of the image along the lines or at the intersections of the 3x3 grid. This will help you achieve a harmonious and balanced composition.
- Keep the aspect ratio in mind. If you need to print your images or post them on a social media platform that has certain size requirements, you will probably need to change the aspect ratio of your image. It can be easily done in any online image cropper.
- Leave some empty space. Don’t crop images in PNG format too closely to the main subject of your photo. Otherwise, it might look like your subject is trapped or crammed in the frame. This is especially true for cropping portraits.
- Remove distractions. If for some reason your shot has details and small elements that are too obtrusive and distracting, you need to get rid of them. All the attention should be on the main subject.
- Add some sharpness and contrast. After cropping, you might need to slightly bump up the level of sharpness and contrast to make the details look better and clearer.
- Experiment. Don’t be afraid to experiment with different cropping options. Sometimes, by cropping an image in PNG format in a different way, you can get an unexpectedly great result.
- Don’t delete the original image. When editing, it’s important to make sure that your original image will remain unchanged; so that you can always go back to it if necessary.
Wrapping Up
PNG format is ideal choice for text-heavy images even if you have a scan with lots of handwritten text. In a PNG image every letter will look sharp and clear. That’s why this format is great for logos, screenshots, infographics, illustrations and basically any image that contains a lot of text, various shapes and sharp lines.
Due to the fact that PNG format supports transparency, PNG is an ideal choice for logos and icons because they often need to have a transparent background. Thanks to the transparent background, your PNG logo will fit in anywhere. It can easily be used on a website, added to a PowerPoint presentation or overlayed on a photo, regardless of the content, color scheme or background.
It might be also a good idea to opt for saving your images in PNG format when you need edit one and the same image several times because of its lossless compression.