Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#278573 - 30/03/2006 13:26 Windows XP picture viewer annoyance
ShadowMan
addict

Registered: 09/06/1999
Posts: 559
Loc: Newfoundland, Canada
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.
_________________________
12 gig empeg Mark II, SN: 080000101
30 gig RioCar SN: 30103114
My blog

Top
#278574 - 30/03/2006 13:34 Re: Windows XP picture viewer annoyance [Re: ShadowMan]
SE_Sport_Driver
carpal tunnel

Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
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.
_________________________
Brad B.

Top
#278575 - 30/03/2006 14:45 Re: Windows XP picture viewer annoyance [Re: SE_Sport_Driver]
ShadowMan
addict

Registered: 09/06/1999
Posts: 559
Loc: Newfoundland, Canada
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
_________________________
12 gig empeg Mark II, SN: 080000101
30 gig RioCar SN: 30103114
My blog

Top
#278576 - 30/03/2006 14:54 Re: Windows XP picture viewer annoyance [Re: SE_Sport_Driver]
CrackersMcCheese
pooh-bah

Registered: 14/01/2002
Posts: 2489
The first time you select to rotate an image it warns you that you'll lose information

Top
#278577 - 30/03/2006 14:57 Re: Windows XP picture viewer annoyance [Re: ShadowMan]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Unfortunately, you can't use file size as a test to see if the transform was done losslessly.
_________________________
Bitt Faulk

Top
#278578 - 30/03/2006 15:23 Re: Windows XP picture viewer annoyance [Re: CrackersMcCheese]
matthew_k
pooh-bah

Registered: 12/02/2002
Posts: 2298
Loc: Berkeley, California
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

Top
#278579 - 30/03/2006 15:35 Re: Windows XP picture viewer annoyance [Re: wfaulk]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
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.
_________________________
Remind me to change my signature to something more interesting someday

Top
#278580 - 30/03/2006 16:00 Re: Windows XP picture viewer annoyance [Re: ShadowMan]
DWallach
carpal tunnel

Registered: 30/04/2000
Posts: 3810
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.

Top
#278581 - 30/03/2006 16:16 Re: Windows XP picture viewer annoyance [Re: andy]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
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.
_________________________
Bitt Faulk

Top
#278582 - 30/03/2006 20:23 Re: Windows XP picture viewer annoyance [Re: wfaulk]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
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...
_________________________
Remind me to change my signature to something more interesting someday

Top
#278583 - 30/03/2006 21:33 Re: Windows XP picture viewer annoyance [Re: DWallach]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
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

Top
#278584 - 31/03/2006 08:35 Re: Windows XP picture viewer annoyance [Re: ShadowMan]
pedrohoon
enthusiast

Registered: 06/08/2002
Posts: 333
Loc: The Pilbara, Western Australia
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
_________________________
Peter.

"I spent 90% of my money on women, drink and fast cars. The rest I wasted." - George Best

Top