What is a PNG image?
PNG is a lossless image format. A file starts with an 8-byte signature, then chunks: IHDR with the size and colour type, optional PLTE and tRNS, IDAT with the zlib-compressed pixels, and IEND. Each chunk ends with a CRC-32.
Image pipelines meet odd PNGs all the time: 16-bit channels, palettes with a transparent entry, 1×1 pixels, huge dimensions, or a CRC that does not match. These files cover each case and show the size in the picture.
Anatomy of a PNG image
\x89PNGThe 8-byte signatureIHDRWidth, height, bit depth, colour typePLTE / tRNSPalette and transparency for indexed imagesIDATFiltered, zlib-compressed pixel rowsIENDThe end markerCRCA CRC-32 after every chunk
What you can generate
- 1×1 to 8000×8000 pixels
- Gradient, checkerboard, colour bars, noise or solid colour
- RGB, grayscale, indexed (palette) or 16-bit per channel
- Transparency: alpha channel, gray+alpha or a tRNS palette entry
- A size label drawn in a built-in pixel font
- Broken on purpose: bad IDAT CRC or truncated before IEND
How to make one
- Open the PNG image generator, or start from a preset above.
- Set the size and switch on the edge cases you need; the preview and size estimate follow every change.
- Generate, then download. The file is made in your browser, and the same preset and seed always give you the same file.
Questions
Yes. The pixels and the PNG encoder are our own code, so the same settings give byte-identical files in every browser.
It writes the width and height in the image, so you can see at a glance whether a pipeline resized or cropped it. Switch it off for a clean pattern.
Noise does not compress: 64 million pixels × 3 bytes is about 192 MB. Gradients and solid colours compress to a fraction of that.