Straighten a rectangle that was photographed at an angle. Place the four corners on its edges, choose whether the output is the rectangle alone or the whole photo, and download the result at full resolution.
Place the corners
The handles start inset from the frame. Drag each one onto a corner of the rectangle in the photo: the edge of a page, the frame of a whiteboard, the outline of a sign, the base and roofline of a façade. A grid is drawn inside the shape as you go. Its lines are the straight lines of the corrected result mapped back onto the photo, so a grid line that runs along a real edge means the corner is right and one that drifts off it means the corner needs moving.
Holding a corner opens a loupe, a circle that shows the photo at three times its displayed size around the handle. Use it to land the corner on the pixel where two edges meet. With a handle focused, the arrow keys move it by one pixel of the source image and Shift with an arrow key by ten.
The shape has to stay four-sided. A drag that would fold one corner across the opposite edge is refused.
Crop to corners
The default output makes the area inside the corners the whole picture. This is the document-scanner mode: a page on a desk, a slide on a projector screen, a notice on a wall, a whiteboard at the end of a meeting. Nothing outside the corners survives.
Example: a phone photo of an A4 page shot from a chair. Put the corners on the four corners of the paper and download. The output is the page alone, square to the frame, in A4 proportions, at a width equal to the longer of the page’s two horizontal edges in the original.
Keep everything
Keep everything applies the same correction to the entire photo, then trims it. This is the architecture mode: converging verticals on a building, a room shot from a corner, a storefront photographed from across the street. Place the corners on something in the scene that is really rectangular, such as a window, a door or the façade itself, and the whole picture is straightened around it.
Straightening stretches the parts of the picture that were farther from the camera, so the corrected photo is a trapezoid rather than a rectangle. The output is the largest rectangle that fits inside it with no empty corners, found by searching every pair of top and bottom edges. The Output readout shows the size that produces. When the perspective is so steep that nothing outside the corners can be framed, the mode falls back to the corners alone and says so.
Proportions
A rectangle seen at an angle does not keep its proportions in the photo, so the width and height of the output cannot be read from the drawn shape. They are estimated from the perspective instead. The two vanishing points of the quadrilateral, where its opposite edges would meet, fix the focal length of the lens if the optical centre sits at the middle of the frame, and the focal length fixes the real width over height. The method is the closed form from Zhang and He’s whiteboard scanning work at Microsoft Research, and on a photo straight out of a camera it recovers a page’s proportions to within a few percent.
It needs perspective to read. When opposite edges of the drawn shape are parallel, as in a photo taken square on, there is no vanishing point and the proportions of the drawn shape are used as they are. A cropped photo, or one with the optical centre moved by a shift lens, gives an estimate that is off by the same amount the centre is off.
Resampling
Every output pixel is traced back through the inverse of the mapping to a position in the source and sampled there with Catmull-Rom bicubic interpolation, which keeps text edges and fine lines sharper than the bilinear sampling most upload tools use. The width of the output is set by the longer of the two horizontal edges you drew, so the sharpest edge of the original is never scaled down. The preview resamples a reduced copy; the download works on the full file in a background thread with a progress readout.
Limits
Lens distortion is not perspective. A wide lens bows straight lines into curves, and a four-corner mapping moves lines without unbending them. Correct the curve first with the Lens Distortion Effect at a small negative Curvature, then straighten here.
The far side of a steep perspective is enlarged, so a page photographed at a grazing angle comes out soft along its far edge. There are fewer source pixels there than the output asks for, and no resampler can add detail that was never captured.
Keep everything removes real picture at the edges by design. If the trimmed frame loses something you need, move the corners onto a rectangle closer to the centre of the photo, which reduces the correction and the amount trimmed with it.