Windows XP picture viewer annoyance

Posted by: ShadowMan

Windows XP picture viewer annoyance - 30/03/2006 13:26

Is there any way to get Windows XP's Picture and Fax viewer to display images rotated according to their exif data? I like the way the viewer works, but I refuse to rotate the images using that program and possibly lose some quality.

Thanks in advance for any tips!

Rene

P.S. I used ACDSee's lossless rotation feature in the past, but I don't want to install any more software then I need.
Posted by: SE_Sport_Driver

Re: Windows XP picture viewer annoyance - 30/03/2006 13:34

I can't help too much except to offer that JPEGs support lossless image rotation. I use the feature all the time with Irfanview. My Sony DSC-U50 can rotate its lens 180 degrees so I can take self portraits with a friend. Then I use Irfanview to losslessly rotate them 180 degrees back.

Having this automatic would be better, but I'm pretty sure the Windows program does it losslessly too... I simple test of file size should let you know.
Posted by: ShadowMan

Re: Windows XP picture viewer annoyance - 30/03/2006 14:45

Quote:
I can't help too much except to offer that JPEGs support lossless image rotation. I use the feature all the time with Irfanview. My Sony DSC-U50 can rotate its lens 180 degrees so I can take self portraits with a friend. Then I use Irfanview to losslessly rotate them 180 degrees back.

Having this automatic would be better, but I'm pretty sure the Windows program does it losslessly too... I simple test of file size should let you know.


The size is different... in one example I just tried here it went from 1,386,317 bytes to 1,298,466 bytes.




Rene
Posted by: CrackersMcCheese

Re: Windows XP picture viewer annoyance - 30/03/2006 14:54

The first time you select to rotate an image it warns you that you'll lose information
Posted by: wfaulk

Re: Windows XP picture viewer annoyance - 30/03/2006 14:57

Unfortunately, you can't use file size as a test to see if the transform was done losslessly.
Posted by: matthew_k

Re: Windows XP picture viewer annoyance - 30/03/2006 15:23

I remember it warning me the first time it would have to do it lossily, which was not the first time. I was under the impression that it was dependent on the dimensions of the jpg. These days I use a mac and shoot raw, and any jpgs are throwawy coppies anyways.

Matthew
Posted by: andy

Re: Windows XP picture viewer annoyance - 30/03/2006 15:35

Quote:
Unfortunately, you can't use file size as a test to see if the transform was done losslessly.


You kind of can actually:

- use XP picture viewer to rotate through 90 degrees
- close XP picture viewer
- note the new file size
- use XP picture viewer to rotate back and forth through 90 degrees a few times (closing it each time you rotate)
- at the end rotate back to the position you first rotated it to
- note the finishing file size

If the file size after the first rotation and the last are the same then you can be pretty sure that it is rotating losslessly. I've just done this and it would appear to be rotating losslessly, which is a surprise.

If it wasn't rotating losslessly then the file size would change and more and more rotations were applied.
Posted by: DWallach

Re: Windows XP picture viewer annoyance - 30/03/2006 16:00

A standard Cygwin install includes "jpegtran" which supports lossless rotations. You'd need to find some other tool that understands EXIF such that you could script your rotations (and suitably change the EXIF header). Or, just install Picasa (free at picasa.google.com) and don't worry about it.
Posted by: wfaulk

Re: Windows XP picture viewer annoyance - 30/03/2006 16:16

I know jpegtran does it losslessly and it changes the file size. (I even rotated 90, then 270 degrees with it, converted that and the original to pnm and verified that the two resultant files were identical, despite that the input files were differently sized.) However, I also know that the MS thing tosses EXIF data when you rotate.
Posted by: andy

Re: Windows XP picture viewer annoyance - 30/03/2006 20:23

Quote:
I know jpegtran does it losslessly and it changes the file size. (I even rotated 90, then 270 degrees with it, converted that and the original to pnm and verified that the two resultant files were identical, despite that the input files were differently sized.) However, I also know that the MS thing tosses EXIF data when you rotate.


I think misunderstood my explanation, I probably wasn't clear enough. I wasn't suggesting that rotating losslessly kept the file size the same. If you take a jpeg and rotate it losslessly by 90 degrees from the original file, the file size will change.

What I was saying is that you can demonstrate that a lossless rotation has taken place by rotating through 90 degrees, saving the jpeg, loading the rotated jpeg, rotating it back through 90 degress and then saving it again. Do that a couple of times and if the file size at a particular rotation point doesn't change then you have lossless rotation going on.

It looks like the Windows Viewer partially trashes the EXIF data, which is wierd. It retains some of the basic data and tosses the rest (and appears to corrupt a few fields). Before rotation I have:

File: IMG_6427_old.JPG
File size: 1,458KB
Image Serial Number: 264-6427
Camera Model: Canon EOS 10D
Camera serial number: 0330201671
Firmware: Firmware Version 2.0.0
Owner: Andrew Norman [email protected]
Date/Time: 2006:02:01 21:43:03
Shutter speed: 2 sec
Aperture: 8
Exposure mode: Av
Exposure compensation: -1/2
Flash: Off
Metering mode: Evaluative
Drive mode: Single frame shooting
ISO: 100
Lens: 17 to 40mm
Focal length: 40mm
Subject distance: 0.280 m
AF mode: Manual focus
Image size: 2048 x 3072
Rotation: none
Image quality: Fine
White balance: Tungsten
Color space: sRGB
Saturation: Normal
Sharpness: Normal
Contrast: Normal
Tone: Normal
Custom Functions:
CFn 1: SET button function when shooting: Menu display
CFn 2: Shutter release w/o CF card: Not possible
CFn 8: RAW+JPEG mode: large, fine
CFn 9: Bracket sequence: -, 0, +, Auto cancel: Enable
CFn 11: Menu button display position: Previous

and after:

File: IMG_6427_end.JPG
File size: 1,477KB
Image Serial Number: 264-6427
Camera Model: Canon EOS 10D
Camera serial number: 0330201671
Date/Time: 2006:02:01 21:43:03
Shutter speed: 2 sec
Aperture: 8
Exposure mode: Auto
Exposure compensation: -1/2
Flash: Off
Metering mode: Center-weighted average
Drive mode: Single frame shooting
Self-timer: 65 secs
ISO: 100
AF mode: One-shot AF
Image size: 3072 x 2048
Image quality: Unknown
White balance: Auto
Color space: sRGB
Custom Functions:
Default settings

So it looks like it is fine for rotating, as long as you don't care about your EXIF data too much

I wouldn't let it near any of my photos...
Posted by: mlord

Re: Windows XP picture viewer annoyance - 30/03/2006 21:33

Quote:
A standard Cygwin install includes "jpegtran" which supports lossless rotations. You'd need to find some other tool that understands EXIF such that you could script your rotations (and suitably change the EXIF header). Or, just install Picasa (free at picasa.google.com) and don't worry about it.


exiftran -aip image.jpg
Posted by: pedrohoon

Re: Windows XP picture viewer annoyance - 31/03/2006 08:35

Viewing JPEGs in Konqueror under Kubuntu, they are automatically rotated (based on EXIF?).

The best I can suggest for windows is Irfanview.

It annoys me that Microsoft, with all their resources, can't implement lossless JPEG rotation in the XP image viewer