Rotate vs. Flip: Two Different Transformations
Rotating and flipping an image are both common corrections, but they're mathematically distinct operations that solve different problems. Rotation turns the entire image around a center point by a specified angle — 90-degree rotations are lossless and pixel-perfect (every pixel maps cleanly to a new grid position), while arbitrary angles require interpolation, which can introduce slight blurring at the edges since rotated pixels no longer align exactly to the new pixel grid.
Flipping (mirroring) reverses an image along an axis — horizontal flip swaps left and right, vertical flip swaps top and bottom — without changing the image's overall orientation angle at all. This is exactly why a flip and a 180-degree rotation, despite both feeling like "the image is now upside down or reversed," produce genuinely different results: a 180-degree rotation flips both axes simultaneously, while a single flip only reverses one.
This runs entirely via HTML5 Canvas transformation matrices in the browser — the same underlying mechanism (2D affine transforms) that powers CSS transforms and most image editing software's basic geometry operations, applied here without any file upload to a server.