A quick series of factlets and links that may be useful.
The JPEG image format is compressed with a "lossy" algorithm. That is, each time it is compressed, some image data may be lost, reducing the quality.
JPEG is very useful for cameras to fit many images on the memory card. JPEG is very useful for uploading to the web, or sending to a printing bureau. JPEG is not a good choice for your working copies between those two points.
Always save your working images in a "lossless" format, such as TIFF, PNG, or the GIMP's .XCF formats.
Proprietary versus Open Formats
Users of proprietary software like Photoshop might want to consider using an open standard which won't disappear in a couple of decades. This includes choices such as JPEG, TIFF, PNG and XCF, among others. Even in the year 2075, you'll still be able to find the code for open standards, adapt it to futuristic computers, and load up those old photos. The same can't be guaranteed for proprietary options.
Orienting JPEG Files
The open source tools called jhead and jpegtran are designed to work with image files without uncompressing and recompressing them. Thus, they don't cause any data loss or quality degradation.
Use jhead to investigate EXIF tags in your images. Cameras bury a lot of details in those tags, such as shutter speed and resolution. Many cameras will even record whether you were holding the camera sideways at the time you took the shot.
The jpegtran utility can rotate those jpeg images: left, right or even upside down. Since the data is never uncompressed, the image will retain all of its quality, unlike when you load the pixels into a photo editor just to rotate and save them back out again.
Finally, these two programs will tag-team: if you have both tools, then jhead will call jpegtran for any images which were shot sideways, and turn them right-side up! They're fast, too. Hundreds of images can be automatically oriented in a matter of seconds.
Contact Ed Halley by email at
Text, code, layout and artwork are Copyright © 1996-2008 Ed Halley.
Copying in whole or in part, with author attribution, is expressly allowed.
Any references to trademarks are illustrative and are controlled by their respective owners.