Photo rotation


I performed long-overdue experimentation with various software approaches to photo rotation on 2/11/04. This page summarizes the results. The goal is simple: rotate JPEG images without losing embedded JPEG information (and, ideally, without changing the file's datestamp).

Camedia Master

Camedia rotates an image by changing the orientation byte value in the picture's JPEG info; originally the orientation is 1 (0x61), changed to 6/3/8 (0x66/0x63/0x68) for rotation by cw90/180/ccw90. This is fine for its own purposes, although it does touch the file's timestamp. However, it is useless for other programs, which typically ignore the JPEG info. Thus, Opera and Windows XP Picture and Fax Viewer display the rotated image as unrotated.

EZThumbnails

EzThumbs can rotate a picture as well as generate thumbnails. For example,

EzThumbs /w=2048 /h=1536 /r=90 foo.jpg
EzThumbs /w=2048 /h=1536 /r=-90 foo.jpg
EzThumbs /w=2048 /h=1536 /r=180 foo.jpg

rotate the image cw90/ccw90/180, generating tn_foo.jpg in each case; note that the width and height specs are before rotation, not after. However, the JPEG info in the original file is deleted from the generated file.

GIMP

The GIMP can rotate an image with Image >> Transforms >> Rotate, but as with EzThumbs the JPEG information from the original is lost.

HP Photo and Imaging Gallery

HP Photo & Imaging rotates pictures while preserving JPEG information. This makes it the most successful alternative found to date. Rotation does touch the file datestamp. HP Photo & Imaging always leaves behind two files hpothb07.dat and hpothb07.tif which must be deleted ex post facto.

Windows XP Picture and Fax Viewer

Windows XP Explorer invokes the Windows XP Picture and Fax Viewer, which I used for months for picture rotation. It does preserve the original datestamp for the rotated image file. However, it has two serious faults. It mishandles JPEG information. It does not delete JPEG info; worse, instead it garbles it, making it useless. Second, it is highly unreliable: rotation (especially after deletion of photos in the same directory) crashes the program. These problems are probably related (i.e. a programming error in JPEG handling).

Conclusion

Use HP Photo and Imaging Gallery for rotation until a better alternative becomes available. Remember to clean up the garbage files left behind afterwards.


etc index
All photos

All content © 2004 by Stephen A. Ness.
Last update: 2/12/04