PNG
PNG is a lossless raster format built for screenshots, interface assets and anything with hard edges or transparency. Saving a PNG never degrades the image, but the file is usually much larger than JPEG.
At a glance
- MIME type
- image/png
- Extensions
- .png
- Kind
- Image
- Compression
- Lossless
- Type
- Encoded bitstream
- Transparency
- Supported
- Bit depth
- 8 or 16-bit per channel
File structure
A PNG is a signature followed by chunks: IHDR describes dimensions and colour type, PLTE carries a palette when used, IDAT holds the compressed pixel data, and tEXt/iTXt store metadata. Chunk order is fixed, which is what makes streaming decoders possible.
How the data is compressed
Pixel data is filtered per scanline and then compressed with DEFLATE, the same lossless algorithm used by ZIP. Nothing is discarded, so a 3000-pixel photo can reach 15MB while the same photo as a JPEG stays under 1MB.
Where it is accepted
Supported by every browser and by virtually all design, office and print tools. Some upload forms still reject PNG for photos because of the size, not because of the format.
Strengths
- Lossless: saving repeatedly never adds artefacts.
- Full alpha channel, including soft shadows and semi-transparent edges.
- Excellent for screenshots, diagrams, logos and text-heavy graphics.
Weaknesses
- Large files for photographic content.
- No animation in the standard most tools understand (APNG support is uneven).
- Not a delivery format for photos on the web.
Typical uses
- Screenshots and UI assets that must stay pixel-sharp.
- Logos with transparency.
- Intermediate files during editing.
Common problems
- A photo exported as PNG is often 10× the JPEG size for no visible gain.
- 16-bit PNGs are silently flattened to 8-bit by many web pipelines.
- Renaming .png to .jpg does not convert anything and can break upload validation.