The workbench

Thirteen formats, one picture.

The plate is read once, then written in every format this library can write and read straight back. Below it, the arithmetic: crop, turn, scale, blur by kernel or by three box passes, sharpen, brighten, turn the hue. Every number and every pixel on this page came out of the library compiled to JavaScript.

Formats The arithmetic

A lens test plate: a Siemens star, a colour strip, a sixteen-step grey wedge and four rulings, printed on warm paper.
Test plate 071200 × 800

Written back, format by format

encoded, decoded, and compared with the pixels that went in

Round trip

FormatBytesReads back asPixels
reading the plate…

Exact means every sample came back identical. Within a step means the format stores the colour at a coarser resolution than eight bits — Radiance shares one exponent between three mantissas, OpenEXR rounds to a half — and lossy means it threw colours away on purpose.

format — size — layout — bytes —

The arithmetic

each button runs one operation on the plate, in this tab

operation — size —

Geometry

Filters

Colour

An angle that is not a right one

7°

A quarter turn is a permutation and costs nothing; any other angle resamples, because the source of an output pixel almost never lands on a sample. The canvas grows to hold what comes out.