Rotate and flip images
Rotate photos by 90, 180 or 270 degrees or any angle, flip them, and fix sideways phone photos by applying their EXIF orientation.
Questions
Why does a photo look sideways in some apps?
Phones save the picture as the sensor sees it and add an EXIF orientation tag saying how to turn it. Apps that ignore the tag show it sideways. Saving here applies the turn to the pixels and drops the tag.
What happens to the corners when I rotate by an angle?
The image grows to fit the turned picture. Corners are transparent for PNG, WebP and AVIF, or filled with the colour you pick (white by default for JPG).
Are quarter turns lossless?
The pixels are moved exactly, with no resampling. A JPG is still saved again, so use quality 95 or more, or PNG, to keep it pristine.