Back to Guide
.png
Portable Network Graphics
Portable Network Graphics (PNG) is a raster-graphics file format that supports lossless data compression. PNG was developed as an improved, non-patented replacement for Graphics Interchange Format (GIF).
Advertisement
History & Origin
PNG was created in 1995 by an Internet working group to replace GIF, which used the patented LZW compression algorithm. It was designed to support better compression and more colors than GIF, and crucially, alpha channel transparency.
Internal Structure
A PNG file consists of an 8-byte signature followed by a series of chunks. Key chunks include IHDR (header), IDAT (image data), and IEND (end). It uses DEFLATE compression (similar to ZIP) to reduce size without losing data.
Advantages
- Lossless compression: No quality loss when saving.
- Transparency: Supports variable alpha-channel transparency.
- Color depth: Supports true color (48-bit) and grayscale.
- No licensing issues: Open standard.
Disadvantages
- File size: Can be larger than JPEG for photographs.
- No animation: Unlike GIF, standard PNG does not support animation (though APNG does).
- Complexity: More complex to process than simpler formats like BMP.
Common Use Cases
Web graphics (logos, icons, charts)
Screenshots
Images requiring transparency
Line art and drawings with sharp edges
Advertisement
