Rutba Office
Download

How to rotate a photo without losing quality

Turning a JPEG in an ordinary editor and saving it compresses the picture again, and each save loses a little more. There are two ways to turn one that lose nothing: change the orientation tag the camera wrote, or turn the compressed blocks themselves. A PNG can be turned and saved as often as you like.

9 October 2026 · 5 min read

Why rotating can cost quality

A JPEG is stored in small blocks of 8 by 8 pixels, each compressed by throwing away detail the eye is least likely to miss. An editor that rotates the picture has to decode those blocks into pixels, turn the pixels, and compress them all again. The second compression throws more detail away. One save is hard to see. Ten saves at a modest quality setting show as smudged edges and blocky skies.

PNG, GIF, BMP and most TIFF files are compressed without losing anything, so turning and saving them is safe. HEIC photos from phones and lossy WebP files are in the same position as JPEG.

The first way: the orientation tag

A camera or phone saves the picture the way the sensor saw it and writes an Orientation tag into the EXIF data to say how it should be shown. The value 1 means as stored, 6 means turned 90 degrees clockwise, 3 means 180 degrees and 8 means 90 degrees anticlockwise. The other four values add a mirror image.

Changing the tag turns the picture without touching a single pixel, so it costs nothing however often it is done. Its weakness is software that ignores the tag. Web browsers have honoured it for images since 2020, but some older programs, printer firmware and upload forms that strip the metadata without applying it first will show the photo the way the sensor stored it. That is the usual reason a photo that looks right on the phone turns up sideways somewhere else.

The second way: turning the blocks

The compressed blocks themselves can be rearranged without decoding them, which turns the stored picture and loses nothing. The command-line tool jpegtran does this (jpegtran -rotate 90), and so do several image viewers that offer a lossless rotate, IrfanView with its JPG Lossless Rotation plugin and XnView MP among them.

There is one catch. It only works exactly when the width and height divide into the block size, which is 8 or 16 pixels depending on how the colour was stored. Otherwise the leftover strip at one edge cannot be moved, and the tool either trims it (a few pixels off one side) or refuses. Most camera sizes divide evenly; cropped pictures often do not.

Use this way when the picture is going somewhere that may ignore the tag, such as an old print kiosk. Set the tag back to 1 afterwards, or the picture will be turned twice.

A few habits that keep photos sharp

  • Rotate before you edit, then do all the editing and save once at a high quality.
  • Keep the original from the camera and work on a copy.
  • If a photo shows sideways in one program only, the tag is fine and that program is ignoring it. Fixing it in another editor only adds a save.

Our own product, disclosed

Where our own software comes into this

Since version 1.33.0, Pictures in Rutba Office has Rotate the picture: Ctrl+R, the right-click menu or the button on the bar turns a photo a quarter clockwise in its file and saves it. A JPEG is turned by its orientation tag and its pixels are not touched, with a tag added where the file had no EXIF data. A PNG is redrawn, which loses nothing. Other formats are turned in Image, which Edit opens. The R key on its own only turns the view and leaves the file alone.

Download it free →Compared with the alternatives →

Ten apps, one free download

No account, no telemetry, and it works with the network switched off.

One family

The rest of Rutba

One account across all of it. Sign in once and the products know each other.

OFFICE-ARTICLES-DETAIL · 7596826