Reply
Thread Tools Display Modes
#1
Old 06-17-2010, 07:20 AM
Member
Join Date: Mar 2002
Location: Trantor
Posts: 11,756
How to rotate jpg pictures?

Is there an easy way to rotate jpg pictures? My son sent me several hundred and about half of them are "sideways".
#2
Old 06-17-2010, 07:29 AM
Guest
Join Date: Feb 2007
Location: Challenger Deep
Posts: 10,982
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.
#3
Old 06-17-2010, 07:32 AM
Guest
Join Date: Apr 2001
Location: Europe
Posts: 5,413
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.
#4
Old 06-17-2010, 07:38 AM
Guest
Join Date: Nov 2004
Location: Hey! I'm located! WOOOOW!
Posts: 38,503
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.
#5
Old 06-17-2010, 07:41 AM
Charter Member
Join Date: Jun 2000
Location: St. Louis, MO 50mi. West
Posts: 4,728
Second Nava's IrfanView recommendation. You can even do batch jobs.
#6
Old 06-17-2010, 08:01 AM
Guest
Join Date: Nov 2004
Location: ATX
Posts: 6,029
On a mac? Use Graphic Converter.
#7
Old 06-17-2010, 08:10 AM
Member
Join Date: Mar 2002
Location: Trantor
Posts: 11,756
I should have specified Win XP as the OS. I will search for IrfanView. Thanks for the replies.
#8
Old 06-17-2010, 09:56 AM
Guest
Join Date: Jul 2002
Location: UK
Posts: 4,930
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 is a lossless JPEG rotator that will work in Explorer, too.

Si
#9
Old 06-17-2010, 11:52 AM
Member
Join Date: Oct 2009
Posts: 6,728
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.
#10
Old 06-17-2010, 12:59 PM
Guest
Join Date: Dec 2005
Location: Riverside, CA
Posts: 12,105
Hm, I never realized a simple rotation would compress a JPG further than it's already compressed. Why does that happen?
#11
Old 06-17-2010, 01:00 PM
Charter Member
Moderator
Join Date: Jan 2000
Location: The Land of Cleves
Posts: 77,359
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.
#12
Old 06-17-2010, 01:11 PM
Guest
Join Date: Jul 2002
Location: UK
Posts: 4,930
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
#13
Old 06-17-2010, 01:14 PM
Guest
Join Date: Dec 2005
Location: Riverside, CA
Posts: 12,105
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.
#14
Old 06-17-2010, 11:59 PM
Charter Member
Join Date: Aug 2001
Posts: 14,569
Quote:
Originally Posted by Rigamarole View Post
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?
#15
Old 06-18-2010, 12:17 AM
Charter Member
Join Date: May 2000
Location: SW Side, Chicago
Posts: 44,405
Quote:
Originally Posted by Rigamarole View Post
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.)
#16
Old 06-18-2010, 04:16 AM
Guest
Join Date: Aug 2008
Location: "Hicksville", Ark.
Posts: 34,186
Quote:
Originally Posted by Chronos View Post
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.
#17
Old 06-18-2010, 04:19 AM
Guest
Join Date: Jul 2001
Posts: 28,704
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.

Last edited by jjimm; 06-18-2010 at 04:20 AM.
#18
Old 06-18-2010, 12:18 PM
Charter Member
Moderator
Join Date: Jan 2000
Location: The Land of Cleves
Posts: 77,359
Quote:
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.
#19
Old 06-18-2010, 12:32 PM
Guest
Join Date: May 2010
Location: UK
Posts: 153
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.
#20
Old 06-18-2010, 02:44 PM
Charter Member
Moderator
Join Date: Jan 2000
Location: The Land of Cleves
Posts: 77,359
Quote:
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.
#21
Old 06-18-2010, 03:56 PM
Guest
Join Date: Dec 2005
Location: Riverside, CA
Posts: 12,105
Quote:
Originally Posted by Duckster View Post
Aren't you converting your master .jpg images to the native .psd format before manipulating?
Nah, I mostly work with RAW files and save them out as TIFs (and sometimes also JPGs) but in the case that I do work with JPGs from the beginning it's usually just for minor edits and I'm not going to bother converting to PSD.
#22
Old 06-18-2010, 03:58 PM
Guest
Join Date: Dec 2005
Location: Riverside, CA
Posts: 12,105
Quote:
Originally Posted by Chronos View Post
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.
He's in for some upgrading then, since Apple is the "largest company" now.
#23
Old 06-18-2010, 08:49 PM
Guest
Join Date: Mar 2003
Location: Minneapolis, MN
Posts: 14,209
Quote:
Originally Posted by Hari Seldon View Post
Is there an easy way to rotate jpg pictures? My son sent me several hundred and about half of them are "sideways".
Send 'em back to him and tell him to fix them!

Play the old-man-doesn't-understand-technology-like-you-younger-guys-do card. Especially effective around Fathers Day!
#24
Old 06-18-2010, 10:22 PM
BANNED
Join Date: Apr 1999
Location: Chicago,IL
Posts: 14,962
You can't beat XNView. I haven't found anything I need to do that it can't do. And it's free
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 07:58 PM.

Send questions for Cecil Adams to: [email protected]

Send comments about this website to:

Terms of Use / Privacy Policy

Advertise on the Straight Dope!
(Your direct line to thousands of the smartest, hippest people on the planet, plus a few total dipsticks.)

Copyright 2018 STM Reader, LLC.

Copyright © 2017
Best Topics: 95th dan ryan cut obsidian chapstick on nose welding ships pronunciation of sacajawea elise pronunciation rhyme rules mulan mom first nature definition cracker bolts lady pink panther why do public restrooms have gaps cost of cat euthanasia what is travel percentage keep pizza warm in oven do i bring a gift to a bachelorette party how tall was adam and eve cost of home bowling alley chihuahua mixed with great dane is war and peace worth reading is it illegal to go through someone's trash magnum pi was higgins robin masters whats a second chance offer on ebay