Bitmorfy
Raster FormatReleased 1996W3C Recommendation / ISO/IEC 15948

PNG File Format Guide

Portable Network Graphics

The web standard for lossless raster graphics, offering pixel-perfect fidelity, 8-bit alpha channel transparency, and Deflate stream compression.

MIME Typesimage/png
Extensions.png
Magic Bytes89 ...
CompressionLossless
Alpha TransparencySupported
LicensingOpen

Filtering & The Deflate Compression Pipeline

PNG does not compress raw pixels directly. Instead, it processes each scanline through one of five pre-compression spatial filters (None, Sub, Up, Average, Paeth). These filters calculate the difference between the target pixel and neighboring pixels to the left, above, or diagonally. By converting absolute pixel values into delta values, the data becomes significantly more repetitive and compressible.

The filtered byte stream is subsequently compressed using the Deflate algorithm, combining LZ77 sliding-window dictionary substitution with canonical Huffman entropy encoding. Because Deflate is strictly lossless, every single decoded pixel is mathematically identical to the original source.

PNG supports true alpha channel transparency with 256 gradations of translucency (8-bit alpha), enabling flawless compositing, anti-aliased drop shadows, and clean overlays on arbitrary web backgrounds.

Primary AlgorithmDeflate (LZ77 + Huffman coding) with 2D Delta Predictor Filters
Supported Color SpacessRGB, Grayscale, Indexed Palette (8-bit)
Bit Depth Capabilities1-bit to 16-bit per channel (up to 48-bit RGB or 64-bit RGBA)
Extended FeaturesAnimationHDR / Wide Color

Bitmorfy PNG Interactive Utilities

Convert, optimize, and compress PNG files directly in your browser with 100% privacy.

Technical Guides & In-Depth Tutorials

Deep dive into compression best practices, transparency management, and format selection.

Engineering Tradeoff Analysis

Graphic & Text FidelityFlawless

Zero compression artifacts; perfect for line diagrams, UI screenshots, logos, and vector rasterizations.

Photographic SizeSuboptimal

Lossless photographic PNG files are routinely 3× to 8× larger than equivalent quality JPEGs or WebPs.

Alpha TransparencyIndustry Standard

Full 8-bit alpha channel allows soft anti-aliased transparent edges without jagged halos.

Encoding OverheadModerate

Exhaustive heuristic filter evaluation can require high CPU cycles during maximum compression.

Platform Compatibility Matrix

Desktop & Mobile BrowsersUniversal

Universal support across all modern and legacy browsers.

Design & Editing Applications (Figma, Photoshop)Universal

Primary interchange standard for transparent layers and UI assets.

Mobile Operating SystemsUniversal

Native rendering in iOS, Android, macOS, Windows, and Linux.

Recommended Use Cases

  • User interface graphics, application screenshots, logos, and brand identity assets
  • Images requiring complex anti-aliased transparency or semi-transparent drop shadows
  • Scientific graphs, medical imaging, and diagrams with high-contrast text and thin lines
  • Intermediate graphic assets destined for multi-pass editing where lossy compression cannot be tolerated

Avoid Using For

  • Full-bleed website banner photography (causes slow LCP load times due to massive byte payload)
  • Smartphones photo storage (burns storage rapidly without visual benefit over HEIC/JPEG)
  • Strict upload forms with 100KB or 200KB caps (often impossible for complex photos in PNG)

Frequently Asked Technical Questions

What is the difference between PNG-8 and PNG-24?

PNG-8 uses an indexed color palette capped at 256 distinct colors (similar to GIF), producing very small files for simple graphics. PNG-24 supports 16.7 million colors (24-bit TrueColor) plus an optional 8-bit alpha channel (often called PNG-32) for photographic depth and smooth transparency.

Why do transparent PNGs turn black when converted to JPG?

JPEG has no alpha channel. When an image parser flattens an alpha channel into RGB without composite instructions, the transparent pixels (alpha = 0) have default zero values, which interpret as black (RGB 0,0,0). Bitmorfy's converter automatically applies a clean white matte to prevent black backgrounds.

Does compressing a PNG reduce image quality?

Standard PNG compression is mathematically lossless — quality never degrades. Size reduction is achieved by optimizing LZ77 match lengths, stripping non-essential metadata (EXIF/ICC chunks), or running quantization (reducing bit depth if explicitly requested).

Why is my PNG screenshot so large compared to a JPG?

Screenshots with photographic elements contain high entropy and noise that Deflate cannot compress easily. Converting that screenshot to WebP or high-quality JPEG can reduce file size by 80% with zero visible degradation on standard displays.

Related Format Architectures