Images on a page

Images placed on a page.

Images placed on a page, starting with the two that matter most in practice: a JPEG, whose bytes go into the file as they stand so nothing is compressed again and nothing is lost, and a PNG whose transparency is carried across as it stands.

Each image named on the command line gets a page exactly as big as it is: at seventy-two dots to the inch one pixel is one point, so the page that comes out is the image that went in, pixel for pixel, which is what makes the result checkable. A last page lays both out the way a real document would.

What this example shows

  • A JPEG's bytes passed through as they stand, never compressed again.
  • A PNG's transparency carried across as it stands.
  • A page sized to the image, one pixel to one point.

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 Images on a page

What this document weighs

This document weighs 9,332 bytes, and weighed exactly as much before.

This document is pictures and nothing else: it carries no font, so it had nothing to lose and its weight is what its pictures weigh. 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.

Columns measured from their cells

One parts list twice: four columns sharing the width equally, then the reference, the quantity and the price each as wide as their own widest cell and the description given everything they leave.

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.

Every example, by subject