# How to rotate jpg pictures?

**URL:** <https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534>\
**Category:** Factual Questions\
**Created:** [June 17, 2010, 12:20pm UTC](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534 "2010-06-17T12:20:29Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hari\_Seldon](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hari_seldon/32/5173_2.png) [@Hari\_Seldon](https://boards.straightdope.com/u/Hari_Seldon)\
**Post date:** [June 17, 2010, 12:20pm UTC](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534/1 "2010-06-17T12:20:29Z")

</div>

Is there an easy way to rotate jpg pictures? My son sent me several hundred and about half of them are “sideways”.

---

<div class="post-metadata">

**Author:** ![Machine\_Elf](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Machine\_Elf](https://boards.straightdope.com/u/Machine_Elf)\
**Post date:** [June 17, 2010, 12:29pm UTC](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534/2 "2010-06-17T12:29:17Z")

</div>

Any number of programs can do this. Microsoft Photo Editor (included with earlier versions of MS Office, just not part of the default install) does it. MS Picture Manager (included with later versions) does it.

ACDSee (photo managing/viewing software) does it.

---

<div class="post-metadata">

**Author:** ![psychonaut](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/psychonaut/32/4655_2.png) [@psychonaut](https://boards.straightdope.com/u/psychonaut)\
**Post date:** [June 17, 2010, 12:32pm UTC](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534/3 "2010-06-17T12:32:26Z")

</div>

Most of the programs which rotate JPEGs will cause the quality to deteriorate. Make sure you select a tool that claims it can “losslessly” rotate JPEGs. If you are familiar with compiling and running command-line tools, you can use the software provided by the official JPEG Committee. Otherwise you’ll have to look for something that meets your needs and runs on your operating system.

---

<div class="post-metadata">

**Author:** ![Nava](https://avatars.discourse-cdn.com/v4/letter/n/da6949/32.png) [@Nava](https://boards.straightdope.com/u/Nava)\
**Post date:** [June 17, 2010, 12:38pm UTC](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534/4 "2010-06-17T12:38:30Z")

</div>

I use irfanview, it’s free and the comand shortcuts to rotate are l and r

Remember to save photos after rotating them, if you want them to stay rotated.

---

<div class="post-metadata">

**Author:** ![GaryM](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/garym/32/241_2.png) [@GaryM](https://boards.straightdope.com/u/GaryM)\
**Post date:** [June 17, 2010, 12:41pm UTC](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534/5 "2010-06-17T12:41:48Z")

</div>

Second **Nava’s** IrfanView recommendation. You can even do batch jobs.

---

<div class="post-metadata">

**Author:** ![UncleRojelio](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/unclerojelio/32/3160_2.png) [@UncleRojelio](https://boards.straightdope.com/u/UncleRojelio)\
**Post date:** [June 17, 2010, 1:01pm UTC](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534/6 "2010-06-17T13:01:04Z")

</div>

On a mac? Use Graphic Converter.

---

<div class="post-metadata">

**Author:** ![Hari\_Seldon](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hari_seldon/32/5173_2.png) [@Hari\_Seldon](https://boards.straightdope.com/u/Hari_Seldon)\
**Post date:** [June 17, 2010, 1:10pm UTC](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534/7 "2010-06-17T13:10:02Z")

</div>

I should have specified Win XP as the OS. I will search for IrfanView. Thanks for the replies.

---

<div class="post-metadata">

**Author:** ![si\_blakely](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@si\_blakely](https://boards.straightdope.com/u/si_blakely)\
**Post date:** [June 17, 2010, 2:56pm UTC](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534/8 "2010-06-17T14:56:07Z")

</div>

You can do this directly in Windows Explorer - turn on Thumbnail view, select (using the CTRL key) all the sideways images, right click on the last one and select Rotate Clockwise (or Rotate Anticlockwise). This is lossless (unless the image was a progressive jpeg, in which case it will be converted to a standard baseline jpeg).

[This](http://annystudio.com/software/jpeglosslessrotator/) is a lossless JPEG rotator that will work in Explorer, too.

Si

---

<div class="post-metadata">

**Author:** ![needscoffee](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/needscoffee/32/1076_2.png) [@needscoffee](https://boards.straightdope.com/u/needscoffee)\
**Post date:** [June 17, 2010, 4:52pm UTC](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534/9 "2010-06-17T16:52:17Z")

</div>

Irfanview has an option to rotate losslessly, but it’s under a different menu option than the regular rotate, which is not lossless. It’s under OPTIONS:JPG Lossless Rotation.

---

<div class="post-metadata">

**Author:** ![Rigamarole](https://avatars.discourse-cdn.com/v4/letter/r/77aa72/32.png) [@Rigamarole](https://boards.straightdope.com/u/Rigamarole)\
**Post date:** [June 17, 2010, 5:59pm UTC](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534/10 "2010-06-17T17:59:12Z")

</div>

Hm, I never realized a simple rotation would compress a JPG further than it’s already compressed. Why does that happen?

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [June 17, 2010, 6:00pm UTC](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534/11 "2010-06-17T18:00:25Z")

</div>

Why would lossy rotation be the default, anyway? For multiples of 90 degrees, at least, lossless rotation would just entail a straightforward shuffling of arrays, and would almost have to be simpler than any sort of lossy method.

---

<div class="post-metadata">

**Author:** ![si\_blakely](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@si\_blakely](https://boards.straightdope.com/u/si_blakely)\
**Post date:** [June 17, 2010, 6:11pm UTC](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534/12 "2010-06-17T18:11:46Z")

</div>

Lossless jpeg rotation just involves setting an orientation flag in the jpeg image header. Many modern cameras also set the camera orientation in the EXIF data, and most photo editing tools can auto-set the image orientation from the camera orientation. Jpeg display libraries should honour the jpeg orientation flag.

You cannot just shuffle arrays because jpg files are not arrays of bytes, it is a stream that encodes clusters of data. So any rotation involves decompressing the data into a bitmap, rotating the bitmap (which is shuffling arrays) and then recompressing the image to a new jpeg. But the data you have to compress is not the original image, it is the decompressed jpg with compression artifacts. Which then gets compressed into an image with more compression artifacts - losing more of the original data from the final rotated jpg.

Si

---

<div class="post-metadata">

**Author:** ![Rigamarole](https://avatars.discourse-cdn.com/v4/letter/r/77aa72/32.png) [@Rigamarole](https://boards.straightdope.com/u/Rigamarole)\
**Post date:** [June 17, 2010, 6:14pm UTC](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534/13 "2010-06-17T18:14:55Z")

</div>

Do you know if Photoshop does this by default? I’ve been using Photoshop to rotate images for a long time (among other things, of course) and it never occurred to me that I might be compressing it further with every single rotation.

---

<div class="post-metadata">

**Author:** ![Duckster](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/duckster/32/1244_2.png) [@Duckster](https://boards.straightdope.com/u/Duckster)\
**Post date:** [June 18, 2010, 4:59am UTC](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534/14 "2010-06-18T04:59:19Z")

</div>

> [@Rigamarole](#):
>
> Do you know if Photoshop does this by default? I’ve been using Photoshop to rotate images for a long time (among other things, of course) and it never occurred to me that I might be compressing it further with every single rotation.

Aren’t you converting your master .jpg images to the native .psd format before manipulating?

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [June 18, 2010, 5:17am UTC](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534/15 "2010-06-18T05:17:53Z")

</div>

> [@Rigamarole](#):
>
> Do you know if Photoshop does this by default? I’ve been using Photoshop to rotate images for a long time (among other things, of course) and it never occurred to me that I might be compressing it further with every single rotation.

As far as I know, Photoshop doesn’t do lossless JPEG rotation. If you resave a JPEG as a JPEG, you will lose some data. If you save your rotated JPEG in a lossless format, you will not.

To be honest, if you use fairly high quality settings for your JPEG compression, an extra pass through the algorithm is not going to be noticeable for the vast majority of photographic data (I’m not talking line drawings and the like here.) In fact, I make prints of JPEGs of JPEGs all the time (at 80% quality setting), and darned if I can tell the difference. Yes, ideally you always want to keep the highest possible quality file around. I keep RAW files of every last thing I shoot. But I don’t freak out if I need to make a print of a JPEG of a JPEG. It looks fine, unless you’ve compressed it to holy hell (or if it’s not a typical continuous tone photographic print.)

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [June 18, 2010, 9:16am UTC](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534/16 "2010-06-18T09:16:11Z")

</div>

> [@Chronos](#):
>
> Why would lossy rotation be the default, anyway? For multiples of 90 degrees, at least, lossless rotation would just entail a straightforward shuffling of arrays, and would almost have to be simpler than any sort of lossy method.

Because most programs aren’t just designed to rotate, but to edit the image, and thus convert it to Bitmap first. And then, when you save, it converts that image back to JPEG. It’s only specialized JPEG rotation utilities (or commands) that actually alter the JPEG file itself.

---

<div class="post-metadata">

**Author:** ![jjimm](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@jjimm](https://boards.straightdope.com/u/jjimm)\
**Post date:** [June 18, 2010, 9:19am UTC](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534/17 "2010-06-18T09:19:29Z")

</div>

Picasa, free from Google, does this and much much more. And it’s very user friendly.

ETA: and it leaves the RAW format where it is.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [June 18, 2010, 5:18pm UTC](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534/18 "2010-06-18T17:18:04Z")

</div>

> [@](#):
>
> Lossless jpeg rotation just involves setting an orientation flag in the jpeg image header. Many modern cameras also set the camera orientation in the EXIF data, and most photo editing tools can auto-set the image orientation from the camera orientation. Jpeg display libraries should honour the jpeg orientation flag.

Ah, this does explain a problem I (or rather, my father) have had. When I take a picture with my camera, I orient the camera for portrait or landscape according to what better frames the picture, and they show up on my screen oriented correctly. But when I send them to my dad, he always complains about the sideways pictures. Given that he uses Microsoft products exclusively, and given Microsoft’s attitude towards standards they didn’t create, they probably just didn’t implement the rotation flag.

---

<div class="post-metadata">

**Author:** ![JoeH2O](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@JoeH2O](https://boards.straightdope.com/u/JoeH2O)\
**Post date:** [June 18, 2010, 5:32pm UTC](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534/19 "2010-06-18T17:32:33Z")

</div>

Tell him to use Picassa - it’s free from Google and runs on Win and Mac and will respect the orientation sensor data from your camera.

There are a number of other tools on the Mac (to add an Apple flavour - most of the Windows options have been covered) - Preview (built into OS X) does it with Command+R and Command+L, Graphic Converter which has been mentioned, iPhoto, Aperture, Picassa, and any other large app like Photoshop/Photoshop Elements.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [June 18, 2010, 7:44pm UTC](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534/20 "2010-06-18T19:44:24Z")

</div>

> [@](#):
>
> Tell him to use Picassa - it’s free from Google and runs on Win and Mac and will respect the orientation sensor data from your camera.

I’ve told him to use all sorts of things. But he’s convinced that the largest company with the most money logically must make the best of everything.

[Next page](https://boards.straightdope.com/t/how-to-rotate-jpg-pictures/543534.md?page=2)
