How it works
The image is opened by the browser’s own decoder and drawn into a preview canvas that is never larger than 2048 pixels on its longest side, whatever the size of the original. Every number you see — the crop box’s X, Y, width and height and the output size — is measured in pixels of the full image as it looks after rotation and flips, not in screen pixels, so the box can be scaled to any screen without changing what it selects. Dragging measures how far the pointer has travelled since you pressed, converts that into image pixels with the ratio between the image and the preview on screen, and rebuilds the box from where it started, so rounding never accumulates over a long drag.
Rotation and flips are kept as a description of the turn rather than applied to the pixels straight away. When the result is written, the rotation, the flip, the shift to the crop’s corner and the scale to the output size are combined into a single transform, and the original image is drawn through it once with the browser’s high-quality smoothing. The pixels are resampled one time only, however many times you turned the picture or changed the crop.
A shape preset locks the crop box: dragging a corner keeps the opposite corner pinned and follows whichever direction the pointer moved further, and dragging an edge grows the box about its centre. The output size is worked out from the exact ratio of the preset rather than from the crop, which has to land on whole pixels: a 16:9 crop of a 1000-pixel-wide image is 1000 × 563, which scaled to 1280 wide would be 721 tall, yet the YouTube thumbnail preset still writes exactly 1280 × 720. Half a second of quiet after a change, the crop is encoded again and its real file size is shown, and only formats the browser proved it can write in a one-pixel test are offered.