PNG, short for Portable Network Graphics, is a lossless raster image format that stores every pixel exactly as it was saved, with optional alpha transparency and bit depths up to 16 bits per channel. In photography and image processing, PNG serves as an intermediate and delivery format for graphics, screenshots, composites and edited images that must not accumulate compression artifacts.
PNG was created in the mid-1990s as a patent-free replacement for GIF and is standardized as ISO/IEC 15948 and as a W3C Recommendation. It is excellent at exact reproduction, but its files are much larger than JPEG for continuous-tone photographs, which defines where it fits in a photographic workflow.
How PNG compresses images without loss
PNG compression works in two stages. First, each row of pixels passes through a prediction filter that replaces raw values with differences from neighboring pixels. Five filter types exist (None, Sub, Up, Average and Paeth), and the encoder may choose a different one for every row. Second, the filtered data is compressed with DEFLATE, the same LZ77 and Huffman coding algorithm used in ZIP archives.
Because decoding reverses both stages exactly, the reconstructed image is bit-for-bit identical to the original. Prediction works best on flat areas and sharp edges, which is why graphics and screenshots compress very well, while sensor noise and fine texture in photographs leave little redundancy to remove.
The file itself is a sequence of chunks, each with a type code and a CRC checksum. The table summarizes the chunks that matter most for image work.
| Chunk | Purpose | Relevance for photographers |
|---|---|---|
| IHDR | Width, height, bit depth, color type | Defines the basic pixel format |
| IDAT | Compressed image data | Holds the actual pixels |
| iCCP or sRGB | Embedded ICC profile or sRGB flag | Enables correct color management |
| gAMA and cHRM | Gamma and primaries | Fallback color description |
| eXIf | Exif metadata block | Camera data, often ignored by software |
| tEXt and iTXt | Text notes, including XMP | Copyright and descriptive metadata |
Color types, bit depth and transparency
PNG supports five color types and bit depths from 1 to 16 bits per channel. For photographic material the important options are 24-bit RGB, 48-bit RGB for high-precision editing, and the matching variants with an alpha channel that stores a separate opacity value for each pixel.
Alpha transparency allows smooth, anti-aliased edges over any background, which GIF and JPEG cannot provide. This is why PNG is the standard format for cut-out product shots, logos and watermarks. The table shows the color types and their typical uses.
| Color type | Bit depths | Typical use |
|---|---|---|
| Grayscale | 1, 2, 4, 8, 16 | Masks, scans, monochrome images |
| RGB (truecolor) | 8, 16 per channel | Edited photographs, screenshots |
| Indexed color | 1, 2, 4, 8 | Icons and graphics with up to 256 colors |
| Grayscale with alpha | 8, 16 | Soft masks and shadows |
| RGB with alpha | 8, 16 per channel | Cut-outs and composites |
A 16-bit PNG keeps 65,536 tonal levels per channel and resists banding during later adjustments, but it roughly doubles the file size. Many web browsers and apps reduce such files to 8 bits for display.
PNG compared with other image formats
PNG trades file size for fidelity, and the right choice depends on content and destination. JPEG discards information the eye notices less and produces much smaller photographic files. WebP and AVIF offer both lossy and lossless modes plus alpha, usually at smaller sizes than PNG. TIFF remains the archival and print standard with layers and CMYK support, and RAW files hold unprocessed sensor data rather than finished pixels.
| Format | Compression | Transparency | Best use |
|---|---|---|---|
| PNG | Lossless | Full alpha | Graphics, screenshots, composites |
| JPEG | Lossy | None | Photographs for web and sharing |
| GIF | Lossless, 256 colors | One color only | Simple animation |
| WebP | Lossy or lossless | Full alpha | Web delivery with smaller files |
| AVIF | Lossy or lossless | Full alpha | High-efficiency web images, HDR |
| TIFF | Uncompressed or lossless | Full alpha | Print, archive, layered masters |
For a typical 24-megapixel photograph, a PNG file can be five to ten times larger than a high-quality JPEG, depending on noise and detail. The gap is far smaller for clean graphics, where PNG may even be smaller than JPEG.
When to use PNG in a photographic workflow
PNG is the right choice whenever exact pixels or transparency matter more than file size. It is less suitable as the main delivery format for full-frame photos on websites, where page weight affects loading speed. The decision table below captures common situations.
| Situation | Recommended choice | Reason |
|---|---|---|
| Product cut-out on a web shop | PNG or WebP with alpha | Clean edges over any background |
| Screenshot of editing software | PNG | Sharp text without artifacts |
| Intermediate file between tools | 16-bit PNG or TIFF | No generation loss |
| Full photograph on a blog | JPEG, WebP or AVIF | Much smaller file |
| Print master with layers | TIFF or PSD | PNG has no layers or CMYK |
When exporting, embed the ICC profile or convert to sRGB so that colors display predictably. Encoders such as optimizers that test several filter strategies can reduce PNG size by 10 to 30 percent without changing any pixel.
Limitations and common misconceptions
The word lossless refers to the compression stage only. Saving a JPEG as PNG does not restore lost detail; it merely freezes the existing artifacts in a larger file. Likewise, converting an image to indexed color to shrink a PNG is a lossy step, even though the container remains PNG.
- No CMYK support, so PNG is unsuitable as a final file for offset printing.
- Metadata support is inconsistent; many programs drop Exif and XMP chunks.
- Large file sizes for noisy or detailed photographs slow down websites.
- Missing color profiles cause shifted colors in managed and unmanaged viewers.
- Standard PNG has no animation; the APNG extension adds it but is less widely edited.
The short version
PNG is an image format that keeps a picture exactly the way it was saved. It never blurs details or adds blocky marks to make the file smaller. It can also make parts of an image see-through, so a product photo can sit cleanly on any background.
The price is size. PNG files of ordinary photos are large, so JPEG or newer formats are usually better for sharing pictures online, while PNG suits graphics, screenshots and images that will be edited again.
Where it makes a difference
A studio photographer prepares 120 product images of glass perfume bottles for an online store. The bottles are shot on white, edited from raw files, and masked so that the soft shadows and translucent glass stay partly transparent. Exported as PNG with an alpha channel, the cut-outs can be placed on the store’s seasonal backgrounds without halos.
The same images saved as JPEG would need a fixed background color and would show compression noise around the fine glass edges. After running the PNG files through a lossless optimizer, the average size drops from about 2.4 MB to 1.8 MB, and the edges remain perfectly clean at every zoom level on the product pages.