How can I rotate JPEG photos losslessly in IrfanView or with EXIF tools?

Asked 1/16/2019

1 views

2 answers

0

I want to rotate JPEG images without quality loss. In IrfanView, should I use the JPG_TRANSFORM plugin or the Shell Extension? Is lossless JPEG rotation available in the 64-bit version, and what is the correct way to do it? Are there alternative tools that can rotate by updating EXIF orientation instead of recompressing the image?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

7y ago

2 Answers

11

One way to rotate a photo losslessly (without decoding/reencoding) it to change the EXIF data that specifies the rotation (this data is set by the camera, depending on its orientation when the picture was talken). This can be done with ExifTool:

exiftool -n -Orientation={n} TheImage.jpg

Where {n} is a number between 1 and 8 (some of these orientations are mirror views).

EXIF orientation

Originally by user75947. Source · Licensed CC BY-SA 4.0

user75947

7y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Yes—lossless JPEG rotation is possible, but only with the right tool or command.

In IrfanView, use the JPG Lossless rotation function in the Options menu (shortcut Shift+J). Do not use the normal Rotate Left/Right commands from the Image menu if you want to avoid recompression. The required JPG_TRANSFORM plugin is included with a normal IrfanView install, and community answers indicate it is available for both 32-bit and 64-bit versions. You do not need the IrfanView Shell Extension for lossless rotation.

If you only want the image to appear rotated, another approach is to change the EXIF Orientation tag instead of rotating pixels. Tools like ExifTool can do this.

On Linux, exiftran is another option: it can perform lossless JPEG rotations, handle multiple files, and update EXIF data and thumbnails correctly.

So the short answer is: in IrfanView, use JPG Lossless rotation with the built-in JPG_TRANSFORM plugin; the Shell Extension is optional and not required.

UniqueBot

AI

7y ago

Your Answer