Signed-off-by: bones_was_here <bones_was_here@xa.org.au>
- [ -f "${1%.jpg}_alpha.jpg" ] || convert "$1" -depth 8 RGBA:- | xxd -c 4 -g 1 | grep -v " ff " >/dev/null
+ [ -f "${1%.jpg}_alpha.jpg" ] || convert "$1" -auto-orient -depth 8 RGBA:- | xxd -c 4 -g 1 | grep -v " ff " >/dev/null
echo >&2 "Order: 0=rt 1=lf 2=bk 3=ft 4=up 5=dn"
{
echo >&2 "Order: 0=rt 1=lf 2=bk 3=ft 4=up 5=dn"
{
- convert "$name"_rt."$ext" -depth 8 -geometry 512x512 GRAY:-
- convert "$name"_lf."$ext" -depth 8 -geometry 512x512 GRAY:-
- convert "$name"_bk."$ext" -depth 8 -geometry 512x512 GRAY:-
- convert "$name"_ft."$ext" -depth 8 -geometry 512x512 GRAY:-
- convert "$name"_up."$ext" -depth 8 -geometry 512x512 GRAY:-
- convert "$name"_dn."$ext" -depth 8 -geometry 512x512 GRAY:-
+ convert "$name"_rt."$ext" -auto-orient -depth 8 -geometry 512x512 GRAY:-
+ convert "$name"_lf."$ext" -auto-orient -depth 8 -geometry 512x512 GRAY:-
+ convert "$name"_bk."$ext" -auto-orient -depth 8 -geometry 512x512 GRAY:-
+ convert "$name"_ft."$ext" -auto-orient -depth 8 -geometry 512x512 GRAY:-
+ convert "$name"_up."$ext" -auto-orient -depth 8 -geometry 512x512 GRAY:-
+ convert "$name"_dn."$ext" -auto-orient -depth 8 -geometry 512x512 GRAY:-
} | "$brightspot" /dev/stdin
} | "$brightspot" /dev/stdin
i=$1; shift
ia=$1; shift
o=$1; shift; shift
i=$1; shift
ia=$1; shift
o=$1; shift; shift
- convert "$i" "$ia" -compose CopyOpacity -composite -type TrueColorMatte "$tmpdir/x.tga" && \
+ convert "$i" "$ia" -auto-orient -compose CopyOpacity -composite -type TrueColorMatte "$tmpdir/x.tga" && \
pickdxta "$dds_tool" "$dds_sepalpha" "$tmpdir/x.tga" "$o" $1
}
pickdxta "$dds_tool" "$dds_sepalpha" "$tmpdir/x.tga" "$o" $1
}
i=$1; shift
ia=$1; shift
o=$1; shift; shift
i=$1; shift
ia=$1; shift
o=$1; shift; shift
- convert "$i" "$ia" -compose CopyOpacity -composite -type TrueColorMatte "$tmpdir/x.tga" && \
+ convert "$i" "$ia" -auto-orient -compose CopyOpacity -composite -type TrueColorMatte "$tmpdir/x.tga" && \
pickdxta "$dds_tool" "$dds_prealpha" "$tmpdir/x.tga" "$o" $1
}
pickdxta "$dds_tool" "$dds_prealpha" "$tmpdir/x.tga" "$o" $1
}
ia=$1; shift
o=$1; shift
oa=$1; shift
ia=$1; shift
o=$1; shift
oa=$1; shift
- if convert "$i" TGA:- | cjpeg -targa -quality "$1" -optimize -sample 1x1,1x1,1x1 > "$o"; then
+ if convert "$i" -auto-orient TGA:- | cjpeg -targa -quality "$1" -optimize -sample 1x1,1x1,1x1 > "$o"; then
if [ "`stat -c %s "$i"`" -lt "`stat -c %s "$o"`" ]; then
cp "$i" "$o"
fi
else
return 1
fi
if [ "`stat -c %s "$i"`" -lt "`stat -c %s "$o"`" ]; then
cp "$i" "$o"
fi
else
return 1
fi
- if convert "$ia" TGA:- | cjpeg -targa -quality "$2" -optimize -sample 1x1,1x1,1x1 > "$oa"; then
+ if convert "$ia" -auto-orient TGA:- | cjpeg -targa -quality "$2" -optimize -sample 1x1,1x1,1x1 > "$oa"; then
if [ "`stat -c %s "$ia"`" -lt "`stat -c %s "$oa"`" ]; then
cp "$ia" "$oa"
fi
if [ "`stat -c %s "$ia"`" -lt "`stat -c %s "$oa"`" ]; then
cp "$ia" "$oa"
fi
ia=$1; shift
o=$1; shift; shift
# this one MUST run
ia=$1; shift
o=$1; shift; shift
# this one MUST run
- convert "$i" "$ia" -compose CopyOpacity -composite -type TrueColorMatte "$tmpdir/x.png" && \
+ convert "$i" "$ia" -auto-orient -compose CopyOpacity -composite -type TrueColorMatte "$tmpdir/x.png" && \
cwebp $1 "$tmpdir/x.png" -o "$o"
}
cwebp $1 "$tmpdir/x.png" -o "$o"
}
{
i=$1; shift; shift
o=$1; shift; shift
{
i=$1; shift; shift
o=$1; shift; shift
- if convert "$i" TGA:- | cjpeg -targa -quality "$1" -optimize -sample 1x1,1x1,1x1 > "$o"; then
+ if convert "$i" -auto-orient TGA:- | cjpeg -targa -quality "$1" -optimize -sample 1x1,1x1,1x1 > "$o"; then
if [ "`stat -c %s "$i"`" -lt "`stat -c %s "$o"`" ]; then
cp "$i" "$o"
fi
if [ "`stat -c %s "$i"`" -lt "`stat -c %s "$o"`" ]; then
cp "$i" "$o"
fi
{
i=$1; shift; shift
o=$1; shift; shift
{
i=$1; shift; shift
o=$1; shift; shift
- convert "$i" -type TrueColorMatte "$tmpdir/x.tga" && \
+ convert "$i" -auto-orient -type TrueColorMatte "$tmpdir/x.tga" && \
pickdxta "$dds_tool" "$dds_sepalpha" "$tmpdir/x.tga" "$o" $1
}
pickdxta "$dds_tool" "$dds_sepalpha" "$tmpdir/x.tga" "$o" $1
}
{
i=$1; shift; shift
o=$1; shift; shift
{
i=$1; shift; shift
o=$1; shift; shift
- convert "$i" -type TrueColorMatte "$tmpdir/x.tga" && \
+ convert "$i" -auto-orient -type TrueColorMatte "$tmpdir/x.tga" && \
pickdxta "$dds_tool" "$dds_prealpha" "$tmpdir/x.tga" "$o" $1
}
pickdxta "$dds_tool" "$dds_prealpha" "$tmpdir/x.tga" "$o" $1
}
i=$1; shift; shift
o=$1; shift
oa=$1; shift
i=$1; shift; shift
o=$1; shift
oa=$1; shift
- if convert "$i" -alpha off TGA:- | cjpeg -targa -quality "$1" -optimize -sample 1x1,1x1,1x1 > "$o"; then
+ if convert "$i" -auto-orient -alpha off TGA:- | cjpeg -targa -quality "$1" -optimize -sample 1x1,1x1,1x1 > "$o"; then
- if convert "$i" -alpha extract TGA:- | cjpeg -targa -quality "$2" -optimize -sample 1x1,1x1,1x1 > "$oa"; then
+ if convert "$i" -auto-orient -alpha extract TGA:- | cjpeg -targa -quality "$2" -optimize -sample 1x1,1x1,1x1 > "$oa"; then
{
i=$1; shift; shift
o=$1; shift; shift
{
i=$1; shift; shift
o=$1; shift; shift
- convert "$i" -type TrueColor "$tmpdir/x.tga" && \
+ convert "$i" -auto-orient -type TrueColor "$tmpdir/x.tga" && \
"$meprefix"compress-texture "$dds_tool" "$dds_noalpha" "$tmpdir/x.tga" "$o" $1
}
"$meprefix"compress-texture "$dds_tool" "$dds_noalpha" "$tmpdir/x.tga" "$o" $1
}
{
i=$1; shift; shift
o=$1; shift; shift
{
i=$1; shift; shift
o=$1; shift; shift
- if convert "$i" TGA:- | cjpeg -targa -quality "$1" -optimize -sample 1x1,1x1,1x1 > "$o"; then
+ if convert "$i" -auto-orient TGA:- | cjpeg -targa -quality "$1" -optimize -sample 1x1,1x1,1x1 > "$o"; then
{
i=$1; shift; shift
o=$1; shift; shift
{
i=$1; shift; shift
o=$1; shift; shift
- convert "$i" "$tmpdir/x.png" && \
+ convert "$i" -auto-orient "$tmpdir/x.png" && \
cwebp $1 "$tmpdir/x.png" -o "$o"
}
cwebp $1 "$tmpdir/x.png" -o "$o"
}
{
i=$1; shift; shift
o=$1; shift; shift
{
i=$1; shift; shift
o=$1; shift; shift
- if convert "$i" -depth 16 RGBA:- | perl -e 'while(read STDIN, $_, 8) { substr($_, 6, 2) eq "\xFF\xFF" or exit 1; } exit 0;'; then
+ if convert "$i" -auto-orient -depth 16 RGBA:- | perl -e 'while(read STDIN, $_, 8) { substr($_, 6, 2) eq "\xFF\xFF" or exit 1; } exit 0;'; then
if [ -n "$fourcchack" ]; then
fourcchack_dir=`mktemp -d`
if [ -n "$fourcchack" ]; then
fourcchack_dir=`mktemp -d`
- convert "$src" -fx "u*u.a" -type TrueColorMatte "$fourcchack_dir/src.$ext"
+ convert "$src" -auto-orient -fx "u*u.a" -type TrueColorMatte "$fourcchack_dir/src.$ext"
src="$fourcchack_dir/src.$ext"
fi
src="$fourcchack_dir/src.$ext"
fi
-# convert image.tga -depth 8 RGBA:- | perl fiximage.pl 72 | convert -depth 8 -size 72x56 RGBA:- output.tga
+# convert image.tga -auto-orient -depth 8 RGBA:- | perl fiximage.pl 72 | convert -auto-orient -depth 8 -size 72x56 RGBA:- output.tga
cp "$icon_xpm" "$t/darkplaces-icon.xpm"
cnt=
for i in $icons_tga; do
cp "$icon_xpm" "$t/darkplaces-icon.xpm"
cnt=
for i in $icons_tga; do
- convert "$i" "$t/darkplaces-icon$cnt.tga"
+ convert "$i" -auto-orient "$t/darkplaces-icon$cnt.tga"
if [ -z "$cnt" ]; then
cnt=2
else
if [ -z "$cnt" ]; then
cnt=2
else