The Straight Dope

Go Back   Straight Dope Message Board > Main > General Questions

Reply
 
Thread Tools Display Modes
  #1  
Old 06-17-2010, 07:20 AM
Hari Seldon Hari Seldon is offline
Guest
 
Join Date: Mar 2002
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".
Reply With Quote
Advertisements  
  #2  
Old 06-17-2010, 07:29 AM
Machine Elf Machine Elf is offline
Guest
 
Join Date: Feb 2007
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.
Reply With Quote
  #3  
Old 06-17-2010, 07:32 AM
psychonaut psychonaut is offline
Guest
 
Join Date: Apr 2001
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.
Reply With Quote
  #4  
Old 06-17-2010, 07:38 AM
Nava Nava is offline
Guest
 
Join Date: Nov 2004
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.
Reply With Quote
  #5  
Old 06-17-2010, 07:41 AM
GaryM GaryM is offline
Charter Member
 
Join Date: Jun 2000
Location: St. Louis, MO 50mi. West
Posts: 3,384
Second Nava's IrfanView recommendation. You can even do batch jobs.
Reply With Quote
  #6  
Old 06-17-2010, 08:01 AM
UncleRojelio UncleRojelio is online now
Member
 
Join Date: Nov 2004
Location: ATX
Posts: 5,403
On a mac? Use Graphic Converter.
Reply With Quote
  #7  
Old 06-17-2010, 08:10 AM
Hari Seldon Hari Seldon is offline
Guest
 
Join Date: Mar 2002
I should have specified Win XP as the OS. I will search for IrfanView. Thanks for the replies.
Reply With Quote
  #8  
Old 06-17-2010, 09:56 AM
si_blakely si_blakely is offline
Guest
 
Join Date: Jul 2002
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
Reply With Quote
  #9  
Old 06-17-2010, 11:52 AM
needscoffee needscoffee is offline
Guest
 
Join Date: Oct 2009
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.
Reply With Quote
  #10  
Old 06-17-2010, 12:59 PM
Rigamarole Rigamarole is offline
Guest
 
Join Date: Dec 2005
Hm, I never realized a simple rotation would compress a JPG further than it's already compressed. Why does that happen?
Reply With Quote
  #11  
Old 06-17-2010, 01:00 PM
Chronos Chronos is offline
Charter Member
 
Join Date: Jan 2000
Location: The Land of Cleves
Posts: 55,194
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.
Reply With Quote
  #12  
Old 06-17-2010, 01:11 PM
si_blakely si_blakely is offline
Guest
 
Join Date: Jul 2002
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
Reply With Quote
  #13  
Old 06-17-2010, 01:14 PM
Rigamarole Rigamarole is offline
Guest
 
Join Date: Dec 2005
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.
Reply With Quote
  #14  
Old 06-17-2010, 11:59 PM
Duckster Duckster is offline
Charter Member
 
Join Date: Aug 2001
Posts: 12,927
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?
Reply With Quote
  #15  
Old 06-18-2010, 12:17 AM
pulykamell pulykamell is online now
Charter Member
 
Join Date: May 2000
Location: SW Side, Chicago
Posts: 31,009
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.)
Reply With Quote
  #16  
Old 06-18-2010, 04:16 AM
BigT BigT is offline
Guest
 
Join Date: Aug 2008
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.
Reply With Quote
  #17  
Old 06-18-2010, 04:19 AM
jjimm jjimm is offline
Guest
 
Join Date: Jul 2001
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..
Reply With Quote
  #18  
Old 06-18-2010, 12:18 PM
Chronos Chronos is offline
Charter Member
 
Join Date: Jan 2000
Location: The Land of Cleves
Posts: 55,194
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.
Reply With Quote
  #19  
Old 06-18-2010, 12:32 PM
JoeH2O JoeH2O is offline
Guest
 
Join Date: May 2010
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.
Reply With Quote
  #20  
Old 06-18-2010, 02:44 PM
Chronos Chronos is offline
Charter Member
 
Join Date: Jan 2000
Location: The Land of Cleves
Posts: 55,194
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.
Reply With Quote
  #21  
Old 06-18-2010, 03:56 PM
Rigamarole Rigamarole is offline
Guest
 
Join Date: Dec 2005
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.
Reply With Quote
  #22  
Old 06-18-2010, 03:58 PM
Rigamarole Rigamarole is offline
Guest
 
Join Date: Dec 2005
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.
Reply With Quote
  #23  
Old 06-18-2010, 08:49 PM
t-bonham@scc.net t-bonham@scc.net is offline
Guest
 
Join Date: Mar 2003
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!
Reply With Quote
  #24  
Old 06-18-2010, 10:22 PM
Markxxx Markxxx is offline
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 With Quote
Reply



Bookmarks

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 03:32 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Send questions for Cecil Adams to: cecil@chicagoreader.com

Send comments about this website to: webmaster@straightdope.com

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.)

Publishers - interested in subscribing to the Straight Dope?
Write to: sdsubscriptions@chicagoreader.com.

Copyright 2013 Sun-Times Media, LLC.