SplitPicture

Why one tile is a pixel narrower

Pixels are whole. When a picture's width does not divide by the number of columns, some tile has to be different — and the only question is which one, and by how much.

The pixel nobody can split

A picture 1082 pixels wide cut into three columns would need columns 360⅔ pixels wide. There is no such thing as two-thirds of a pixel in a file, so something has to give. The naive answer — round every column down to 360 — gives three files that add up to 1080 and silently loses two columns of pixels off the right edge. Nobody notices in a preview; everybody notices when the tiles are laid side by side and the picture is two pixels short.

Every number below is computed by this site’s splitting engine when the page is built, from the same function the board uses — not typed by hand.

Three rules, three answers

Distribute (the default) hands the spare pixels out one each to the leading columns: 361 + 361 + 360 = 1082. Sizes differ by one pixel at most and the tiles add up exactly.

Last slice gives every column the whole-number size and lets the last absorb the difference: 360 + 360 + 362 = 1082. Useful when every tile but one must be a stated size.

Crop gives every column the whole-number size and drops the spare pixels off the right edge: 360 + 360 + 360 = 1080, with 2 pixels left out. The receipt names how many.

The same question with fixed tile sizes

Cutting by tile size turns the question around. 1800 pixels in 512-pixel tiles is three whole tiles and 264 pixels over. With Last slice the tiles are 512 + 512 + 512 + 264; with Crop they are 512 + 512 + 512 and the 264 pixels are dropped. Distribute keeps the count and evens the sizes out instead.

1082 × 1082 → 9 files · columns 361 + 361 + 360 = 1082 px · rows 361 + 361 + 360 = 1082 px

1082 × 1082 into 3 × 3 with the Distribute rule: the first two columns and rows are 361, the last 360.
FileCellFrom x, yPixels
square-r1c1.pngrow 1 · col 10, 0361 × 361
square-r1c2.pngrow 1 · col 2361, 0361 × 361
square-r1c3.pngrow 1 · col 3722, 0360 × 361
square-r2c1.pngrow 2 · col 10, 361361 × 361
square-r2c2.pngrow 2 · col 2361, 361361 × 361
square-r2c3.pngrow 2 · col 3722, 361360 × 361
square-r3c1.pngrow 3 · col 10, 722361 × 360
square-r3c2.pngrow 3 · col 2361, 722361 × 360
square-r3c3.pngrow 3 · col 3722, 722360 × 360
1082 × 1082 into 3 × 3 with the Distribute rule: the first two columns and rows are 361, the last 360.

Which one to choose

If the tiles will be put back together — a profile grid, a poster, a map — Distribute or Last slice, because both keep every pixel. If every file must be an exact size for software that expects it, Crop, and accept the loss it reports. The board prints the column widths and row heights under the Remainder control, so the choice is made with the numbers in front of you.

A one-pixel difference between tiles is invisible on screen and in print. It only matters to software that requires identical sizes — which is what Crop and Last slice are for.

Open it on the board

Illustration of a picture divided into tiles, for Why One Tile Is A Pixel Narrower

Why One Tile Is A Pixel Narrower