Images on a Page
A photograph that goes in exactly as it came out of the camera, and one with transparent parts that keeps them, each on a page cut to its own size.
A picture that comes from outside rarely has the proportions of the rectangle it has to go in. Stretched to fill the rectangle, it loses its proportions; kept at its own size, it leaves empty space around it or runs past the edge. That choice comes up again with every catalogue and every report you create.
So the decision is made once and named: fit the whole picture inside, fill the rectangle and let the edges be cut, stretch it and accept the distortion, leave it at the size it came, or shrink it only when it is too big. The same picture is shown here under sixteen such rules in a rectangle of one size — stood against an edge or at any of nine points, given a margin, turned a quarter, a half or by an angle, mirrored either way — and nothing on the page was measured by hand. Only the ones that fill their rectangle or come out larger than it overflow, and they are cut at the edge, on purpose.
Nothing is left out and nothing is simplified: this is the program exactly as it runs, for the developer who uses this library. The third is the description itself: a plain list of what the page has to say, which is what the service is sent.
Read the Rust source Read the Python source Read the JSON source
Open the document in English Open the document in French Open the document in German Open the document in Spanish Open the document in Italian Open the document in Portuguese
A photograph that goes in exactly as it came out of the camera, and one with transparent parts that keeps them, each on a page cut to its own size.
Pictures built from numbers rather than read from a file, shown through transparency, masks, a colour profile, press inks and a cutting outline; one picture turned eight ways; and a PNG, a JPEG, a BMP and a TIFF read from files.
The four picture formats read — JPEG, PNG, BMP and TIFF — shown across every picture shipped with the library, each captioned with what its own file declares.
A file of three sheets and a file holding one photograph, each picture on a page cut to its own size; the photograph goes in exactly as the camera wrote it, since reading software reads a photograph itself.
Stripes for the two jobs that want them: Code 128 for any text at all, and the three a till reads — EAN-13, UPC-A, EAN-8 — each with its last digit worked out rather than typed.
The code an invoice, a boarding pass or a label ends up wanting, drawn into the document rather than fetched as a picture and pasted in.