DataDungeon::ImageProbe
Constants
Formats read and written through a library an application links by
requiring it (data_dungeon/tiff), by content type: a decoder gives
{width, height, RGBA pixels}, an encoder takes them.
A pixel counts as visible from this alpha up (about 6%), so the faint noise a cut-out's matting leaves doesn't widen its content box.
Class methods
Raises unless a picture of this size may be decoded.
Just the content box of these pixels, for an animation's keyframes.
The RGBA pixels of a still PNG or WebP, or of an animation's first frame, or of a format an application added (a TIFF): {width, height, pixels}.
libpng's simplified reader takes 16-bit samples with no gAMA or sRGB chunk for linear light, brightening them on the way to 8 bits, and gets interlaced ones wrong besides. Its 16-bit "linear" output gives such samples as stored (premultiplied), so they're read that way and rounded here, at the nearest 8-bit level (within one where partly clear).
An animated WebP's frames as shown at each of these moments (ms from its start): {moment, {width, height, pixels}}. Frames are decoded in order, up to the last moment asked for.
Transparency, content box and dominant colour, from RGBA pixels in one pass. The dominant colour is the mean of the most common colour bin (eight levels a channel), counting each pixel by its opacity.
The most pixels decoded from one picture: 64 Mi (8192 × 8192, 256 MiB as RGBA), forty times the largest any store held in October 2026. A header can claim any size, so a small file could otherwise make DataDungeon allocate gigabytes; this is checked before allocating. An application with bigger pictures raises it. A picture over it is stored unmeasured, and converting it raises.
The most pixels decoded from one picture: 64 Mi (8192 × 8192, 256 MiB as RGBA), forty times the largest any store held in October 2026. A header can claim any size, so a small file could otherwise make DataDungeon allocate gigabytes; this is checked before allocating. An application with bigger pictures raises it. A picture over it is stored unmeasured, and converting it raises.