Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37848888
en ru br
ALT Linux repositórios
5.0: 6b-alt9
4.1: 6b-alt8
4.0: 6b-alt8
3.0: 6b-alt5

Group :: Sistema/Bibliotecas
RPM: libjpeg

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

#!/bin/sh -e
#
# exifautotran [list of files]
#
# Transforms Exif files so that Orientation becomes 1

transform()
{
local f="$1" && shift
local t="$1" && shift
local rc args

rc="$(jpegexiforient -n "$f")" || return
case "$rc" in
2) args="-flip horizontal";;
3) args="-rotate 180";;
4) args="-flip vertical";;
5) args="-transpose";;
6) args="-rotate 90";;
7) args="-transverse";;
8) args="-rotate 270";;
*) args="";;
esac

if [ -n "$args" ]; then
jpegtran -copy all $args "$f" >"$t" || return
jpegexiforient -1 "$t" || return
else
return 1
fi
}

for f in "$@"; do
if [ -L "$f" ]; then
f=`realpath "$f"` || continue
fi
[ -n "${f##-*}" ] || continue
t=`mktemp -- "$f.XXXXXXXX"` || continue
cp -p -- "$f" "$t" &&
transform "$f" "$t" &&
mv -f -- "$t" "$f" ||
{
rm -f -- "$t"
continue
}
done

exit 0
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009