How to automatically lossless rotate pictures in WinXP (keyword is automatic)

Discussion in 'Digital Photography' started by Donna, May 21, 2008.

  1. Donna

    Donna Guest

    Is there a way in Windows to automatically orient portraits head-side up?

    I only snap portraits (anything else is a postcard, in my opinion) ... and
    I often orient the camera at 90, 180, or 270 degrees of normal - therefore
    I find myself tediously stepping through hundreds of photos in Irfanview
    freeware and hitting the shift + J button to losslessly rotate the
    photographs (utilizing the free "JPG Lossless Operations" plugin), manually
    choosing the orientation each time, whether it be 90 degrees, 180 degrees,
    or 270 degrees - and then moving on to the next photo.

    But, I snap hundreds of pictures a day and this manual method gets
    laborious. Plus, I can't be the only one with this very same problem
    (everyone must have it) so it's worth asking ...

    Is there a freeware program that can 'sense' the orientation and
    automatically rotate the pictures? Probably not but it's worth asking the
    question as the worst we'll get back is nothing more than we had, yet the
    best that can come of it (as it often does in group help), is we find the
    solution to the problem.

    So, I ask ...

    Do you know of a Windows freeware program that automatically orients
    pictures losslessly, in batch mode?
    Donna, May 21, 2008
    #1
    1. Advertising

  2. Donna

    Bert Hyman Guest

    In news:SpXYj.4$ Donna <>
    wrote:

    > Do you know of a Windows freeware program that automatically orients
    > pictures losslessly, in batch mode?


    If your camera included the orientation info in the EXIF data (my Canon
    S3 does), IrfanView could do it for you
    (Properties/Settings->JPG/PCD/GIF->Auto-rotate image), although I'm
    not sure about doing it in batch mode.

    So, if you can't find anything that can reliably figure this out based
    solely on examining the pixels in the image, here's an excuse to buy a
    new camera.

    --
    Bert Hyman St. Paul, MN
    Bert Hyman, May 21, 2008
    #2
    1. Advertising

  3. Donna

    Guest

    On Wed, 21 May 2008 08:43:20 -0700, in rec.photo.digital Donna
    <> wrote:

    >Is there a way in Windows to automatically orient portraits head-side up?


    Many cameras have a setting to automatically do just this. Does yours?
    , May 21, 2008
    #3
  4. Donna

    Paul Furman Guest

    Re: How to automatically lossless rotate pictures in WinXP (keywordis automatic)

    wrote:
    > On Wed, 21 May 2008 08:43:20 -0700, in rec.photo.digital Donna
    > <> wrote:
    >
    >> Is there a way in Windows to automatically orient portraits head-side up?

    >
    > Many cameras have a setting to automatically do just this. Does yours?


    But doesn't that normally only work with the camera maker's software?

    --
    Paul Furman
    www.edgehill.net
    www.baynatives.com

    all google groups messages filtered due to spam
    Paul Furman, May 21, 2008
    #4
  5. Donna

    Guest

    On Wed, 21 May 2008 11:14:23 -0700, in rec.photo.digital Paul Furman
    <> wrote:

    > wrote:
    >> On Wed, 21 May 2008 08:43:20 -0700, in rec.photo.digital Donna
    >> <> wrote:
    >>
    >>> Is there a way in Windows to automatically orient portraits head-side up?

    >>
    >> Many cameras have a setting to automatically do just this. Does yours?

    >
    >But doesn't that normally only work with the camera maker's software?


    PSCS2 works for jpgs taken directly in my D70. But I guess your point is
    valid. Irfanview didn't, nor XP. Guess I was mainly thinking about the raw
    converters I've used. Guess this is another small benefit of shooting raw.
    The converters recognize the autorotate setting and the resulting jpgs are
    properly oriented.
    , May 21, 2008
    #5
  6. Donna

    David Bolt Guest

    On Wed, 21 May 2008, Donna wrote:-

    >Do you know of a Windows freeware program that automatically orients
    >pictures losslessly, in batch mode?


    If you're not bothered about using a command line, a combination of
    jhead[0] and jpegtran[1] will do the job. You can rotate single images
    using:

    jhead -ft -autorot "filename.jpg"

    multiple files by using

    jhead -ft -autorot "*.jpg"

    and recursively do whole directories by using something like:

    jhead -ft -autorot "**\*.jpg"

    This is the same tool I use under Linux to do auto-rotation[2] of
    images, and it works very well there


    [0] <URL:http://www.sentex.net/~mwandel/jhead/>

    [1] <URL:http://gnuwin32.sourceforge.net/packages/jpeg.htm>

    [2] Not sure where I found it, but I have a couple of .desktop files
    that adds this auto-rotation to KDE's right-click menu, both for single
    files and directories.

    Regards,
    David Bolt

    --
    Team Acorn: http://www.distributed.net/ OGR-P2 @ ~100Mnodes RC5-72 @ ~15Mkeys
    SUSE 10.1 32bit | openSUSE 10.2 32bit | openSUSE 10.3 32bit | openSUSE 11.0b3
    SUSE 10.1 64bit | openSUSE 10.2 64bit | openSUSE 10.3 64bit
    RISC OS 3.6 | TOS 4.02 | openSUSE 10.3 PPC | RISC OS 3.11
    David Bolt, May 21, 2008
    #6
  7. Donna

    Jeff R. Guest

    "Donna" <> wrote in message
    news:SpXYj.4$...
    > Is there a way in Windows to automatically orient portraits head-side up?
    >
    > I only snap portraits (anything else is a postcard, in my opinion) ... and
    > I often orient the camera at 90, 180, or 270 degrees of normal


    180° ?
    Fascinating!

    Is your name Douglas?

    --
    Jeff R.
    Jeff R., May 22, 2008
    #7
  8. Donna

    Bruce. Guest

    "Donna" <> wrote in message
    news:SpXYj.4$...
    > Is there a way in Windows to automatically orient portraits head-side up?
    >
    > I only snap portraits (anything else is a postcard, in my opinion) ... and
    > I often orient the camera at 90, 180, or 270 degrees of normal - therefore
    > I find myself tediously stepping through hundreds of photos in Irfanview
    > freeware and hitting the shift + J button to losslessly rotate the
    > photographs (utilizing the free "JPG Lossless Operations" plugin),
    > manually
    > choosing the orientation each time, whether it be 90 degrees, 180 degrees,
    > or 270 degrees - and then moving on to the next photo.
    >
    > But, I snap hundreds of pictures a day and this manual method gets
    > laborious. Plus, I can't be the only one with this very same problem
    > (everyone must have it) so it's worth asking ...
    >
    > Is there a freeware program that can 'sense' the orientation and
    > automatically rotate the pictures? Probably not but it's worth asking the
    > question as the worst we'll get back is nothing more than we had, yet the
    > best that can come of it (as it often does in group help), is we find the
    > solution to the problem.
    >
    > So, I ask ...
    >
    > Do you know of a Windows freeware program that automatically orients
    > pictures losslessly, in batch mode?


    Yes, FastStone Image Viewer. I just started using it and it can
    automatically batch rotate pictures based on the orientation flag in the
    EXIF data. I use it with my Canon and it works great and automatically.

    http://www.faststone.org/

    Tools -> JPEG Lossless Rotate -> Auto Rotate Based on EXIF Orientation Tag.

    Bruce.
    Bruce., May 22, 2008
    #8
  9. Donna

    Donna Guest

    On 21 May 2008 16:08:41 GMT, Bert Hyman wrote:

    > If your camera included the orientation info in the EXIF data
    > IrfanView could do it for you
    > (Properties/Settings->JPG/PCD/GIF->Auto-rotate image)


    Hi Bert,
    This is interesting information that I was unaware of.

    If I look at a picture that is "normal" (head up, no rotation needed), my
    Irfanview "info" command (i) tells me the EXIF "Orientation" is "Top left".

    For a picture with the head to the left (needs 90 degree clockwise
    rotation), the EXIF "Orientation" is "Right top".

    And, for a picture with the head to the right (needs 270 degree clockwise
    rotation), the EXIF "Orientation" is "Left bottom".

    I'm not sure I get the algorthm, but, I'll try to draw it below.

    X----------+ +----------X +----------+
    | ^ | | | | |
    | ^ | | < < < | | > > > |
    | ^ | | | | |
    +----------+ +----------+ X----------+
    EXIF Orientation EXIF Orientation EXIF Orientation
    X=Top left X=Right top X=Left bottom

    I'm not sure I get the algorithm.
    Can someone explain the logic of this EXIF Orientation tag?
    Donna, May 22, 2008
    #9
  10. Donna

    Donna Guest

    On 21 May 2008 16:08:41 GMT, Bert Hyman wrote:

    > IrfanView could do it for you
    > (Properties/Settings->JPG/PCD/GIF->Auto-rotate image)


    Hi Bert,

    Even though I don't understand the logic of the EXIF Orientation tag (see
    previous post), I tried this Irfanview 4.00 command on the three files
    previously described.

    Options->Properties->JPG/PCD/GIF->JPEG-Load:
    [x]Auto-rotate image according to EXIF info (if available)

    Amazingly, when I used Irfanview freeware to step through a batch of
    photos, they displayed upright, like they should.

    However, nothing was saved so the photographs kept their original EXIF
    orientation tags.

    So, the Irfanview option of "Auto-rotate" is only ephemeral.
    But, the good news is my camera saves the EXIF orientation information and
    that Irfanview freeware understands it.

    I'll dig a bit more to see if we can get Irfanview to save the uprighted
    EXIF orientation flag, and if it can do so in batch mode.
    Donna, May 22, 2008
    #10
  11. Donna

    Donna Guest

    On 21 May 2008 16:08:41 GMT, Bert Hyman wrote:

    > I'm not sure about [Irfanview] doing it in batch mode.


    Hi Bert,
    Unfortunately, after digging a bit deeper, Irfanview does have a batch mode
    which will "reset" the EXIF orientation tag, but, it will only reset it
    (apparently) to what it currently is.

    File->Batch Conversion/Rename->Options->JPEG:
    [x]Keep original EXIF data
    [x]Reset EXIF orientation tag

    That is, if your picture needs a 90degree rotation, and you rotate it 90
    degrees manually, and then batch convert it with the batch option set to
    "Reset EXIF Orientation tag", the tag will change

    For a photo that requires no rotation ...
    FROM: EXIF Orientation = Top left
    TO: EXIF Orientation = Top left

    Head to the left (requires a 90 degree clockwise rotation) ...
    FROM: EXIF Orientation = Right top
    TO: EXIF Orientation = Top left

    Head to the right (requires a 270 degree clockwise rotation) ...
    FROM: EXIF Orientation = Left bottom
    TO: EXIF Orientation = Top left

    So, with Options->Properties->JPG/PCD/GIF->JPEG-Load: set not to
    auto-rotate according to EXIF information, all the batch "Reset EXIF
    orientation tag" setting did was erroneously set each picture to an EXIF
    orientation of "Top left", which is not the correct result.

    I will try the same batch "reset exif orientation tag", experiment with the
    JPEG-Load set to auto rotate and report back promptly.

    Donna
    Donna, May 22, 2008
    #11
  12. Donna

    Donna Guest

    On 21 May 2008 16:08:41 GMT, Bert Hyman wrote:

    > Irfanview (Properties/Settings->JPG/PCD/GIF->Auto-rotate image),
    > although I'm not sure about doing it in batch mode.


    Hi Bert,
    I found the solution, with your help!
    I could not have done it without you!

    I don't remember seeing this anywhere in my googling, so, consider the
    following a quickie tutorial for automatically rotating any number of
    photographs, in batch mode, using Irfanview freeware.

    HINT:
    You must set THREE SETTINGS! Setting one or two alone will NOT
    automatically rotate your images in batch mode; but, setting all three at
    the same time _will_ automagically rotate all your images in batch mode!

    You must set all three Irfanview 4.00 freeware options below ...
    #1: "Options->Properties" to "Auto-rotate image according to EXIF info"
    #2: "File->Batch conversion->Options" to "Keep original EXIF data"
    #3: "File->Batch converstion->Options" to "Reset EXIF orientation tag"

    Once you do this, now all your photographs will automagically be realigned
    the way they should be, and their EXIF orientation flag will be set to "Top
    left" for all the realigned files.

    I do not know if this is a lossless rotation operation though.

    Does anyone out there know if this automatic batch conversion with EXIF
    orientation rotation is lossy or lossless?
    Donna, May 22, 2008
    #12
  13. Donna

    Donna Guest

    > You must set all three Irfanview 4.00 freeware options below ...
    > #1: "Options->Properties" to "Auto-rotate image according to EXIF info"
    > #2: "File->Batch conversion->Options" to "Keep original EXIF data"
    > #3: "File->Batch converstion->Options" to "Reset EXIF orientation tag"
    > Does anyone out there know if this automatic batch conversion with EXIF
    > orientation rotation is lossy or lossless?


    Hi Bert,

    As a test to see if the Irfanview batch conversion with EXIF rotation
    operation is lossy or lossless, I set two additional batch settings:

    #1: JPEG Save Quality = 100%
    #2: Set Rename Options -> Name Pattern = $E274 $E36868(%Y%m%d %H%M%S)

    By doing so, all the pictures are renamed and reoriented as follows:
    - Left bottom 20080520 211457.jpg
    - Right top 20080520 180548.jpg
    - Top left 20080520 220622.jpg
    etc.

    When I looked at the results, the files actually GAINED in size, so,
    somehow, something changed. I can't tell if it's lossy or lossless though.

    Is there a way to compare two extremely similar images to find out which of
    the two has the least loss in data?
    Donna, May 22, 2008
    #13
  14. Donna

    Donna Guest

    > > You must set all three Irfanview 4.00 freeware options below ...
    > > #1: "Options->Properties" to "Auto-rotate image according to EXIF info"
    > > #2: "File->Batch conversion->Options" to "Keep original EXIF data"
    > > #3: "File->Batch converstion->Options" to "Reset EXIF orientation tag"

    > #1: JPEG Save Quality = 100%
    > #2: Set Rename Options -> Name Pattern = $E274 $E36868(%Y%m%d %H%M%S)


    Hi Bert,

    I solved the problem!

    After more and more tests, I first realized that the batch rotate by EXIF
    orientation tag steps above were lossy.

    Luckily, while I was testing the operation, I then found a totally
    different way to do the desired lossless automatic rotation of the original
    JPEG photographs!

    Here is the tutorial, for others to benefit, as always!

    0. Open any single photo in a batch of photos, in Irfanview 4.00 freeware.
    1. File->Thumbnails, Options->Select all,
    2. File->JPEG Lossless Operations->Lossless transformation with selected
    files
    3. (o)Auto rotate (according to EXIF orientation, if available)

    This automagically performs a lossless batch rotation of all the JPEG files
    based on their EXIF orientation tag!

    In keystroke steps, it's simply the following keypress sequence:
    t, control + a, shift + j, enter

    Those four quick strokes will automatically losslessly rotate all the JPEG
    photographs in the current directory (if they have an EXIF orientation tag
    other than "Top left")!

    Thanks to you, this hint will save me, and countless others, tremendous
    time and effort organizing our JPEG photographs for viewing by others!
    Donna, May 22, 2008
    #14
  15. Donna

    bucky3 Guest

    Re: How to automatically lossless rotate pictures in WinXP (keywordis automatic)

    On May 21, 10:48 pm, Donna <> wrote:
    > Is there a way to compare two extremely similar images to find out which of
    > the two has the least loss in data?


    If you're re-saving a JPEG file, it will be lossy. If you're only
    changing the EXIF metadata, it is lossless. But it seemed like you
    were changing EXIF metadata, then re-saving the JPEG (to make the EXIF
    change stick), so that would be lossy.

    I haven't tried this, but this test should work: save the 2 files as
    BMP and do a file diff on the 2 BMPs.
    bucky3, May 22, 2008
    #15
  16. Donna

    Johnw Guest

    After serious thinking Donna wrote :

    > Hi Bert,
    >
    > I solved the problem!


    > Thanks to you, this hint will save me, and countless others, tremendous
    > time and effort organizing our JPEG photographs for viewing by others!


    Nice work Donna & Bert, your'e right, the tutorial is in the system now
    & googlers will pick it up.
    Johnw, May 22, 2008
    #16
  17. Re: How to automatically lossless rotate pictures in WinXP (keyword is automatic)

    In rec.photo.digital bucky3 <> wrote:
    > On May 21, 10:48 pm, Donna <> wrote:
    >> Is there a way to compare two extremely similar images to find out which of
    >> the two has the least loss in data?


    > If you're re-saving a JPEG file, it will be lossy. If you're only
    > changing the EXIF metadata, it is lossless. But it seemed like you
    > were changing EXIF metadata, then re-saving the JPEG (to make the EXIF
    > change stick), so that would be lossy.


    > I haven't tried this, but this test should work: save the 2 files as
    > BMP and do a file diff on the 2 BMPs.


    But the lossless rotations will lose a few edge pixels to make the
    edge pixel count divisible by four (necessary for the lossless
    algorithm), so there is often a slight loss, so the files won't be
    identical.

    --
    Chris Malcolm DoD #205
    IPAB, Informatics, JCMB, King's Buildings, Edinburgh, EH9 3JZ, UK
    [http://www.dai.ed.ac.uk/homes/cam/]
    Chris Malcolm, May 22, 2008
    #17
  18. In rec.photo.digital bugbear <bugbear@trim_papermule.co.uk_trim> wrote:
    > Donna wrote:
    >> Is there a way in Windows to automatically orient portraits head-side up?
    >>
    >> I only snap portraits (anything else is a postcard, in my opinion) ... and
    >> I often orient the camera at 90, 180, or 270 degrees of normal - therefore


    > OK - gotta' ask; what is the purpose or rotating
    > the camera though 180 degrees?


    Some cameras have viewfinders or LCDs which can be seen from above but
    not below, such as TLRs. In that case when you hold it at arm's length
    over your head to see over heads in a crowd, holding it upside down
    enables you to aim and compose the shot.

    --
    Chris Malcolm DoD #205
    IPAB, Informatics, JCMB, King's Buildings, Edinburgh, EH9 3JZ, UK
    [http://www.dai.ed.ac.uk/homes/cam/]
    Chris Malcolm, May 22, 2008
    #18
  19. * bugbear <bugbear@trim_papermule.co.uk_trim>:

    >> I only snap portraits (anything else is a postcard, in my opinion) ... and
    >> I often orient the camera at 90, 180, or 270 degrees of normal - therefore

    > ^^^
    >
    > OK - gotta' ask; what is the purpose or rotating
    > the camera though 180 degrees?


    To take a self portrait ;-)


    Seriously -- my new shiny Sony A350 has a LiveView display that can be
    tilted up or down. But tilting down goes only to about 45 degrees, and
    that's not enough for the prototypical over-the-head shot in a crowd.
    So you might want to tilt it up 90 degrees and then to rotate the
    camera 180 degrees.

    - Andi
    Andreas Karrer, May 22, 2008
    #19
  20. Donna

    Jeff R. Guest

    "Andreas Karrer" <> wrote in message
    news:...
    >* bugbear <bugbear@trim_papermule.co.uk_trim>:
    >
    >>> I only snap portraits (anything else is a postcard, in my opinion) ...
    >>> and
    >>> I often orient the camera at 90, 180, or 270 degrees of normal -
    >>> therefore

    >> ^^^
    >>
    >> OK - gotta' ask; what is the purpose or rotating
    >> the camera though 180 degrees?

    >
    > To take a self portrait ;-)
    >
    >
    > Seriously -- my new shiny Sony A350 has a LiveView display that can be
    > tilted up or down. But tilting down goes only to about 45 degrees, and
    > that's not enough for the prototypical over-the-head shot in a crowd.
    > So you might want to tilt it up 90 degrees and then to rotate the
    > camera 180 degrees.
    >
    > - Andi


    Thanks Andi.
    *That* makes sense.
    My cruddy old FZ30's LCD rotates and flips enough to keep the camera upright
    under those circumstances, so I naturally assumed...

    ....you know.


    --
    Jeff R.
    Jeff R., May 22, 2008
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. B Young

    lossless rotate of 4mp image- impossible?

    B Young, Aug 26, 2003, in forum: Digital Photography
    Replies:
    10
    Views:
    843
    Bob & Anni
    Aug 27, 2003
  2. Differences in jpg lossless rotate freeware

    , Jan 6, 2005, in forum: Digital Photography
    Replies:
    15
    Views:
    686
    John Fitzsimons
    Jan 7, 2005
  3. JC Dill

    batch lossless auto-rotate jpegs

    JC Dill, Mar 22, 2006, in forum: Digital Photography
    Replies:
    3
    Views:
    483
    jimbok
    Mar 22, 2006
  4. HB

    I want to rotate pics automatically

    HB, Apr 18, 2006, in forum: Digital Photography
    Replies:
    11
    Views:
    1,126
    Greg P.
    Apr 28, 2006
  5. Donchano
    Replies:
    4
    Views:
    1,547
Loading...

Share This Page