Photographic visual for How The Output Size Is Worked Out

how the output size is worked out

Every board's width is a sum you can read off the ruler: margin, picture, gap, picture, margin. The pictures are the only part that scales, so an exact width is solved in one step, never approached by trial.

The two kinds of pixel in a board

Gaps, margins and caption bands are fixed amounts you set in pixels. They do not grow when the pictures do. The pictures are drawn at a common scale, k. At k = 1 the smallest picture in the row (or the narrowest in a column) keeps exactly its own pixels and nothing is enlarged past it. That is the board's Auto size.

So every dimension of the board is a straight line in k: fixed pixels plus k times the pictures. A row of two pictures with a 24 px gap and 48 px margins is 48 + 24 + 48 = 120 fixed pixels plus k times the two pictures' widths at matched height.

Why an exact width is solved, not searched

Ask for 1,200 px and the board measures the line twice — once at k = 0 (just the fixed pixels) and once at k = 1 — and solves for the k that lands on 1,200. Nothing is tried and rounded: the pictures are scaled so the whole sum is the number you typed, and the readout prints it part by part, for example 0 + 588 + 24 + 588 + 0 = 1,200.

Auto
k = 1: the smallest picture keeps its own pixels; nothing is enlarged.
Width or height
k solved so that one dimension is exact; the other follows the pictures' proportions.
Exact width × height
The board is fitted inside the rectangle you set and centred; the rest is padding in the background colour, shown in the sum as pad.
Fixed frame or page
The frame (1080 × 1080, A4 at 300 DPI…) is the output; the pictures are fitted into its cells instead.

When the number cannot be honoured

Print sizes and DPI

A print size is a pixel size in disguise: millimetres ÷ 25.4 × DPI. A4 (210 × 297 mm) at 300 DPI is 2,480 × 3,508 px. The board does that arithmetic for you under Print size, or on a print page, and writes the DPI into JPG (JFIF header) and PNG (pHYs chunk) files so a printer or a form reads it. WebP has no field a browser writes for DPI; the readout says when it is not recorded.

DPI changes nothing about the pixels themselves. A 600 × 400 picture saved at 300 DPI prints at 2 × 1.33 inches; saved at 72 DPI it is the same picture with a different label. Where a form asks for both a pixel size and a DPI, the pixel size is the one that matters.