8 if [ -n "$scaledown" ]; then
9 mogrify -geometry "$scaledown" -quality 100 "$X"
11 echo "$X has no alpha, converting"
12 nvcompress -bc1 "$X" "${X%.*}.dds"
16 if [ -n "$scaledown" ]; then
17 mogrify -geometry "$scaledown" -quality 100 "$X"
19 if convert "$X" -depth 16 RGBA:- | perl -e 'while(read STDIN, $_, 8) { substr($_, 6, 2) eq "\xFF\xFF" or exit 1; ++$pix; } exit not $pix;'; then
20 echo "$X has no alpha, converting"
21 nvcompress -bc1 "$X" "${X%.*}.dds"
24 echo "$X has alpha, converting"
25 nvcompress -alpha -bc3 "$X" "${X%.*}.dds"