Linux Commands Examples

A great documentation place for Linux commands

jpegexiforient

reads or writes the Exif Orientation Tag


see also : jpegtran - exifautotran

Synopsis

jpegexiforient [switches] jpegfile


add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples

0
source
            
Orientation becomes 1 EOF
exit 0;;
esac
case `jpegexiforient -n "$i"` in
1) transform="";;
2) transform="-flip horizontal";;
echo Error while transforming $i - skipped. >&2
else
rm "$i"
mv tempfile "$i"
jpegexiforient -1 "$i" > /dev/null
fi
fi
done
0
source
            
EOF
exit 0;;
esac
case `jpegexiforient -n "$i"` in
1) transform="";;
2) transform="-flip horizontal";;
echo Error while transforming $i - skipped. >&2
else
rm "$i"
mv tempfile "$i"
jpegexiforient -1 "$i" > /dev/null
fi
fi
done
0
source
            
EOF
exit 0;;
esac
case `jpegexiforient -n "$i"` in
1) transform="";;
2) transform="-flip horizontal";;
if test $? -ne 0; then
echo Error while transforming $i - skipped. >&2
else
if mv "$tempfile" "$i"; then
jpegexiforient -1 "$i" > /dev/null
fi
fi
fi
done
0
source
            
esac
case `jpegexiforient -n "$i"` in
1) transform="";;
2) transform="-flip horizontal";;
3) transform="-rotate 180";;
echo Error while transforming $i - skipped. >&2
rm "$tempfile"
else
cp "$tempfile" "$i"
rm "$tempfile"
jpegexiforient -1 "$i" > /dev/null
fi
fi
done
0
source
            
if ($status == 0) set havejpegtran
which convert >& /dev/null
if ($status == 0) set haveconvert
which jpegexiforient >& /dev/null
# Reset exif rotation tags whether we're rotating or not:
# Unfortunately jpegexiforient is broken in karmic (bug 482443)

description

This is a utility program to get and set the Exif Orientation Tag. It can be used together with jpegtran in scripts for automatic orientation correction of digital camera pictures.

The Exif orientation value gives the orientation of the camera relative to the scene when the image was captured. The relation of the ’0th row’ and ’0th column’ to visual position is shown as below.

Value | 0th Row | 0th Column
------+-------------+-----------
1 | top | left side
2 | top | right side
3 | bottom | right side
4 | bottom | left side
5 | left side | top
6 | right side | top
7 | right side | bottom
8 | left side | bottom

For convenience, here is what the letter F would look like if it were tagged correctly and displayed by a program that ignores the orientation tag:

1 2 3 4

888888 888888 88 88
88 88 88 88
8888 8888 8888 8888
88 88 88 88
88 88 888888 888888

5 6 7 8

8888888888 88 88 8888888888
88 88 88 88 88 88 88 88
88 8888888888 8888888888 88

jpegexiforient output the Exif Orientation Tag in a JPEG Exif file. With the options -1 .. -8, it can also be used to set the tag.

OPTIONS

--help

display this help and exit

--version

output version information and exit

-n

Do not output the trailing newline

-1 .. -8

Set orientation value 1 .. 8


see also

jpegtran , exifautotran


author

Guido Vollbeding <guido[:at:]jpegclub[:dot:]org>

How can this site be more helpful to YOU ?


give  feedback