PNG Compatibility: Apps, Versions and Common Limits

November 08, 2026 · PNG.now Editorial · PNG Essentials

Understand why a valid PNG file can behave differently across applications and devices.

Bit Depth and Colour Type: The First Compatibility Gate

A PNG file’s pixel encoding—its bit depth and colour type—determines which viewers and editors can open it without silent data loss. The PNG specification (https://www.w3.org/TR/png-3/#6Colour-values) defines five colour types, but not all are equally supported.

Grayscale (colour type 0) and truecolour (colour type 2) at 8 bits per channel are the universal baseline. Every PNG-aware application since the late 1990s renders these correctly. Problems begin at the edges:

  • 16-bit per channel (colour types 0, 2, 4, 6): Many image editors, including older browser versions, downscale 16-bit to 8-bit on load without warning. macOS Preview displays 16-bit PNGs but cannot save them back at native depth. GIMP and Krita handle full 16-bit, but some online tools—certain CMS upload filters, for example—reject files over 8-bit entirely.

  • Indexed colour (colour type 3) with more than 256 entries is illegal per the spec, yet some exporters produce it. Browsers typically fall back to a nearest-colour algorithm; desktop apps may show banding or error.

  • Greyscale+alpha (colour type 4) and truecolour+alpha (colour type 6) are well-supported in modern software, but legacy applications (Internet Explorer 6–8, Windows XP Paint) treat alpha as an opaque channel or refuse to render the file.

Safe fallback: For maximum compatibility across all PNG viewers, use 8-bit truecolour (colour type 2) or 8-bit truecolour+alpha (colour type 6) with an sRGB chunk. Avoid 16-bit unless the target pipeline explicitly supports it.

Gamma, Chromaticity and Colour Management Support

PNG permits embedded gamma (gAMA chunk) and chromaticity (cHRM chunk) data for colour-accurate display. Application support is inconsistent.

  • Web browsers: Chrome, Firefox and Safari respect gAMA and cHRM when the file lacks an embedded ICC profile. Older Edge versions ignored gAMA entirely, rendering PNGs at sRGB default regardless of metadata.

  • Image editors: Adobe Photoshop ignores PNG gamma and chromaticity in most workflows—it reads only the embedded ICC profile (iCCP chunk) or the document colour space. Affinity Photo honours gAMA but does not expose it in the UI, making debugging difficult.

  • Operating system renderers: Windows File Explorer uses the system colour management engine (littleCMS or ICM), which applies both gAMA and iCCP. macOS Preview ignores gAMA and assumes sRGB, causing mismatched brightness when the same file is viewed in Preview versus Safari.

Practical consequence: A PNG created with a gamma of 1/2.2 (standard sRGB) will appear washed out on macOS Preview if its cHRM indicates a different primaries matrix. The file is valid—the spec allows it—but the user sees a mistake.

Verification step: Open the file in a colour-managed app (Firefox with gfx.color_management.enablev4 set to true in about:config) and compare to the system viewer. If they differ, the gAMA/cHRM data is present but unsupported by one renderer.

Ancillary Chunks That Break Compatibility

PNG’s extensibility via ancillary chunks is a strength, but many applications reject files containing malformed ancillary data or behave unexpectedly when specific chunks are present.

  • sBIT (significant bits): Some encoders write sBIT to indicate that fewer than the full bit depth carries image data. If sBIT values are inconsistent with the actual pixel data, Photoshop and GIMP may clip or expand colour ranges unpredictably. The spec (https://www.w3.org/TR/png-3/#11sBIT) requires sBIT to be ≤ bit depth; violation causes undefined behaviour.

  • tEXt, zTXt, iTXt: Text chunks are ignored by most viewers but stored in metadata. Very long tEXt entries—over 4 KB in some mobile image libraries—can cause the Android Gallery app to fail to decode the image. This Android bug, dating to 2016, persists in some device firmwares.

  • oFFs (image offset): Used by medical imaging and some export tools to position a PNG within a larger canvas. No major browser or image editor respects oFFs; they render the pixel data at (0,0) and discard the offset. The file is not corrupted, but the intended layout is lost.

  • pHYs (physical pixel dimensions): When a PNG is tagged with non-square pixels (a 2:1 aspect ratio for anamorphic video frames, for instance), most apps ignore pHYs. Only specialised tools—FFmpeg, ImageMagick—read and apply it. A square-pixel viewer stretches the image to fit, distorting the content.

Application-Specific Behaviour

Web Browsers

  • Chrome, Firefox, Safari: Render all valid PNGs with the same engine, but differ in how they handle interlacing. Adam7 interlacing (the only PNG interlacing method) is decoded correctly by all three, but Chrome’s progressive render sometimes shows torn rows on slow connections until the full image loads.

  • Internet Explorer 11: Does not support 16-bit grayscale PNGs. Returns a broken image icon or empty space.

Desktop Image Editors

  • Adobe Photoshop (all versions): Cannot save PNGs with colour type 4 (greyscale+alpha). It converts to truecolour+alpha on export. Opening a 16-bit indexed PNG causes an automatic conversion to 8-bit RGB.

  • GIMP: Reads almost all valid PNGs except those with duplicate critical chunks (two IDATs with conflicting compression, for example). GIMP’s PNG export dialog exposes chunk-level options that can produce files incompatible with other editors if misconfigured—setting a non-standard filter type, for instance.

  • Microsoft Paint (Windows 10/11): Opens only 8-bit truecolour and indexed PNGs. 16-bit files produce a “cannot load image” error. Alpha channels are ignored—transparent pixels appear white.

Mobile Operating Systems

  • iOS (native Photos app): Supports up to 8-bit truecolour+alpha. 16-bit PNGs open but are downsampled without notification. The Files app displays a generic thumbnail for any PNG with an embedded ICC profile over 64 KB—a known iOS limit.

  • Android (Gallery app): Rejects PNGs with a palette (PLTE chunk) that exceeds 256 colours, even if the colour type is indexed. Android’s image decoder also fails on files where the IDAT chunk is split into more than 100 segments—a rare but reproducible edge case in high-resolution medical PNGs.

Compression, Filtering and File Size Limits

PNG uses deflate compression (RFC 1951) with five filter types: None, Sub, Up, Average, Paeth. Compatibility issues arise from:

  • Filter type mismatch: Some encoders—early versions of libpng, for example—write filter bytes that do not match the actual filter used, causing decoders to misapply the algorithm. Modern decoders (zlib 1.2.11+) detect this inconsistency and fall back to No Filter, but older decoders crash.

  • IDAT size limits: The PNG spec does not limit IDAT chunk size, but some embedded decoders—in PDF generators, for instance—cap individual IDAT chunks at 2³¹−1 bytes (2 GB). Files with larger IDATs are rejected.

  • Ancillary chunk accumulation: A valid PNG may contain hundreds of text chunks. Applications that parse all chunks into memory (Python’s PIL/Pillow, for example) may exhaust heap on files with over 10,000 tEXt entries—a scenario common in automated logging pipelines.

Safe Fallback Workflow

When a PNG fails to render in one application but opens in another:

  1. Identify the offending chunk: Run pngcheck -v file.png (from libpng) to list all chunks. Look for warnings about unknown critical chunks, duplicate IDATs, or sBIT values exceeding bit depth.

  2. Strip non-critical chunks: pngcrush -rem all -rem gAMA -rem cHRM -rem sRGB -rem iCCP -rem tEXt -rem zTXt -rem iTXt file.png output.png removes all ancillary data. If the file opens after stripping, the issue is in the metadata.

  3. Reduce bit depth: Convert to 8-bit truecolour using convert input.png -depth 8 output.png (ImageMagick). If the file opens, the original bit depth was unsupported.

  4. Recompress with predictable filters: pngcrush -l 9 -f 0 input.png output.png forces filter type 0 (None) and maximum compression. This eliminates filter-mismatch bugs.

Unrecoverable limits: A PNG with a damaged IHDR chunk—invalid width/height, illegal colour type/bit depth combination—cannot be repaired. It violates the format spec at the structural level. The file must be re-exported from the source.