Image cropper
MDV ToolsDrag a selection, or type the numbers, and take the crop away.
- Source
- Crop
- Ratio
How this works
The image is drawn at whatever size fits the screen, but the crop is always measured in the photo's own pixels — the four numbers under the stage are the real thing, and you can type them instead of dragging. Drag inside the selection to move it, drag a handle to resize it, or drag on bare image to start a new one. The selection cannot leave the image, and a ratio button keeps it to that shape while you drag, shrinking rather than overflowing when it meets an edge.
The crop is taken with drawImage onto a canvas of exactly the chosen size and then
encoded, so the result is a re-encode, not a copy of the original bytes: a JPEG cropped
here is compressed a second time, and PNG keeps every pixel exactly. That is why PNG is
the default and the page prints which one you are about to get. Metadata does not survive the
canvas — EXIF, GPS and the colour profile are gone from the crop, which is usually what you want
and occasionally not. An animated GIF is cropped to its first frame only; the page says so rather
than quietly dropping the animation.
Everything happens in this tab: the file is read with FileReader, and the page makes
no network requests. Nothing you drop is stored; the Dark button keeps its own setting in this
browser's local storage.