orient.py [1-8] image-file
DESCRIPTIONThis is a small script for changing the orientation of certain types of digital camera image files. The image data is not modified, but rather the EXIF tags stored with the image are altered to reflect the new orientation. For this reason only images with the correct types of EXIF tags can be changed using this script.
When called with with a numeric argument from 1 to 8, the orientation will be changed as described in the options section below. When called with only a filename, the current orientation will be written to the console (also as a number from 1 to 8).
If the image contains no EXIF information or if the EXIF information is not of the correct type, an error will be displayed and this script will exit immediately.
This script is provided with the image conversion and transformation plugins for Konqueror. For a more general-purpose JPEG rotation/reflection tool, see jpegorient(1) which is also a part of this same set of plugins.
This utility is part of the official KDE add-ons module.
OPTIONSThe possible orientations are represented by the numbers 1 to 8 as follows.
- No change of orientation.
- Flip horizontally.
- Rotate by a half turn (i.e., 180 degrees).
- Flip vertically.
- Transpose image (i.e., reflect across the upper-left to lower-right diagonal axis).
- Rotate by 90 degrees clockwise.
- Transverse transpose image (i.e., reflect across the upper-right to lower-left diagonal axis).
- Rotate by 270 degrees clockwise (i.e., 90 degrees counter-clockwise).