A gallery of picture formats

Every picture the tests ship with, on one page, each captioned with what its own file declares.

One page carrying every picture the engine's tests ship with, each captioned with its size, its colour type, its number of bits per colour and whatever else its own file declares. If you want to know what the library accepts, this is the page to look at.

Nothing in the captions is written by hand. Each line is read back out of the image once it has been opened, so the page states what the library really understood rather than what the example was told. A file that declares nothing says so, which is exactly why it is worth showing next to the ones that do.

What this example shows

  • Every supported picture format on a single page.
  • Captions read back out of the image itself, never typed in.
  • Files that declare nothing shown saying nothing.

The code, in full

The same document is written twice, once in each language. Both files are shown in full, with the code coloured on the server, and can be copied in one click.

The document itself

The document this example writes, ready to open.

Open the document in English

Read the Rust source Read the Python source

First page of A gallery of picture formats

What this document weighs

Before 183,781 bytes
Now 113,285 bytes
Saved 38.4 %

Not one mark on the page changed. See every document measured.

Examples near this one

A picture fitted into a box

One picture fitted into a box of one size eight ways: brought to four different sizes, stood against an edge, turned by a quarter and by an angle of its own, and mirrored — every panel drawn from the placement the rule worked out.

Pictures inside table cells

A catalogue whose first column is a picture rather than text: four pictures of very different sizes and proportions, each fitted whole and undistorted into the cell the table gives it and standing against a different corner of it, claiming no width from its column and no height from its row.

QR codes

A page of QR codes, drawn as squares.

Every example, by subject