How to rotate images automatically

Frequently Asked Questions regarding XnView (including Answers)

Moderators: XnTriq, xnview

User avatar
helmut
Posts: 8120
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

How to rotate images automatically

Postby helmut » Thu Dec 23, 2004 8:26 pm

Introduction
When taking photos using a digital camera, the orientation of some images might not be correct. When viewing them on the computer, their orientation is not correct and one has to turn one's head left or right.

Nowadays, quite a number of digitial cameras have an orientation sensor: When taking the photo, the orientation information of the sensor (and a lot of other data) is saved together with the image data. This orientation information can be read by graphic programs which can automatically rotate the image.

Automatic rotation
By default, in XnView the automatic rotation is activated. XnView rotates the thumbnail, the preview and the images in view mode. Images auto-rotated by XnView displays a small info icon in the bottom left corner of the thumbnail, this way you can see what's going on. See topic "What do the info icons on the thumbnail mean?" for more info on info icons.

Permanent rotation
Also, you can rotate permanently the images based on the EXIF information. This will ensure that the images are oriented properly when viewing in any graphic programs. To do this, you select all your images and select "Tools > JPG Lossless tranformations" (or dropdownlist of symbol 'JPG lossless transformations' in toolbar). In the dialog check the button with "EXIF" on it and then press "Go". XnView will permanently rotate the images based on the EXIF orientation flag.

The JPG rotation is lossless so quality is not affected. Make sure that you keep the checkbox "Reset EXIF orientation value" when rotating permanently. Otherwise XnView will rotate your images, again, when viewing and orientation will be wrong.

Trouble shooting 1: Images and thumbnails are not auto-rotated properly
Some of your images and/or thumbnails might not be auto-rotated properly and are mis-orientied. Reason is that the actual image orientation and the EXIF orientation data mismatch for some reason. Typically this happens if images are rotated without reseting the EXIF orientation value.

There is two ways to correct this problem:

a.) Deactivate auto-rotation
If many of your images are auto-rotated wrongly by XnView, you can fix this by simply deactivating XnView's auto-rotation feature. For this you deactivate the setting "Tools > Options | General > Operations > "Rotate images based on EXIF information".
This solution has the possible drawback, that new images with proper EXIF orientation flag downloaded from your camera are no longer auto-rotated by XnView.

b.) Reset EXIF orientation value
Solution a.) is a simple and quick solution, but more or less a workaround. The proper way to go is to reset the EXIF orientation value.
Select all (!) your images and choose "Tools > JPG lossless rotation > Dialog". In the dialog you activate the checkbox "Reset EXIF orientation value" and confirm the dialog with "OK". The orientation value will be reset this way and these images will no longer be auto-rotated.

Trouble shooting 2: Images are oriented correctly, but thumbnails aren't
By default, XnView uses the thumbnail embedded in the image for displaying. Using the embedded thumbnail speeds up displaying drastically. But there may be problems if the image and the embedded thumbnail differs for some reason, the difference can be orientation, but also contents. If this problem occurs, you deactivate the option "Tools > Options > Browser > Thumbnails > Use embedded thumbnail".
Since XnView uses caching for thumbnails, it is recommended to clear the cache after changing this option, you do this also in the options "Tools > Options > Browser > Cache".

Some of the above info is taken from existing topics:
- Image view and Thumbnail don't match

Return to “XnView - FAQ”

Who is online

Users browsing this forum: No registered users and 1 guest