PNG image file is commonly used on the web, but it has also been around since 1995. PNG files use lossless compression and can support 24-bit images with transparent backgrounds.
What is PNG image file?
PNG is a compressed raster graphic format that is used to store digital images. They are often used as an alternative to JPEG, which is a compressed photo format. PNG files do not have any loss in quality from compression and they can be edited without losing image quality.
PNG stands for Portable Graphics Format and it can be pronounced “ping” or “P-N-G”.
There are three types of PNG files: bitmap images with no transparency; alpha-channel images which contain an opaque background and a transparent foreground layer; and indexed color images (also known as paletted) that use only 256 colors out of the 16 million or more available on most monitors.
PNGs can have either be a lossless file format like GIF, but it may generate larger files when saving. The other type is JPEG, which compresses your photo by eliminating some information in order to save space so it’ll load faster online. With this compression comes a tradeoff: quality will suffer because any time data is compressed, it will lose some of its original quality.
A PNG is a more useful file type to use if you’re going to add transparency, typically for web images or logos where the background needs to be seen through an object in your design.
Web browsers allow users download and save these files with no loss of image quality. It has one big downside: because there are so many color variations available, they can take up lots of space on a computer hard drive even though they may not appear all that different from GIFs when viewed online.
PNGs come as either RGB (red-green-blue) values or indexed colors.
PNG vs JPEG
PNG images are lossless for the reasons listed below:
- It uses a non-progressive encoding scheme that does not remove data with each successive generation, like JPEG. This is known as its “lossless” compression.
- The use of transparency in PNG files allows color information to be saved without any additional cost compared to if it were an opaque file format such as JPG or GIF; which can result in considerably more efficient usage of disk space when saving large numbers of images at once (such as screenshots).
JPEG has three types of quality settings: high, medium and low. A higher setting means better image detail but larger file size. You’ll want to experiment and see what works best depending on your needs.
- JPEG files may grow larger with each generation as they depend on lossy compression to compress images, which can result in a deterioration of image quality over time.
- JPEG is the most common file format for photos and other true-color images on the web due to its excellent tradeoff between small size (as little as one tenth that of PNG or GIF) and acceptable image quality for many purposes such as online viewing at non-high resolutions or when printing without high color fidelity expectations; it also supports alpha channel transparency natively unlike PNGs.
If your goal is maximum photo detail and you don’t mind large file sizes then go with PNG but if you want smaller file sizes while still having decent image quality, use JPEG.