Changed variable names

master
Brainwrecked Tech 5 years ago
parent 7451e358bd
commit f224bf3b5d

@ -4,12 +4,12 @@ abs() {
[[ $[ $@ ] -lt 0 ]] && echo "$[ ($@) * -1 ]" || echo "$[ $@ ]" [[ $[ $@ ] -lt 0 ]] && echo "$[ ($@) * -1 ]" || echo "$[ $@ ]"
} }
DIMS=( $(identify "${1}" | cut -d\ -f3 | sed "s/x/ /g") ) DIMENSIONS=( $(identify "${1}" | cut -d\ -f3 | sed "s/x/ /g") )
PWRS=( 16 32 128 256 512 1024 ) POWERS=( 16 32 64 128 )
for PWR in ${PWRS[@]}; do for POWER in ${POWERS[@]}; do
WIDEDIFS+=( $(abs "${DIMS[0]}-${PWR}") ) WIDEDIFS+=( $(abs "${DIMENSIONS[0]}-${POWER}") )
HITEDIFS+=( $(abs "${DIMS[1]}-${PWR}") ) HITEDIFS+=( $(abs "${DIMENSIONS[1]}-${POWER}") )
done done
IFS=$'\n' IFS=$'\n'
@ -17,7 +17,7 @@ WIDESORT=( $(sort -n <<<"${WIDEDIFS[*]}"))
HITESORT=( $(sort -n <<<"${HITEDIFS[*]}")) HITESORT=( $(sort -n <<<"${HITEDIFS[*]}"))
unset IFS unset IFS
for SIZE in $((DIMS[0] - WIDESORT[0])) $((DIMS[0] + WIDESORT[0])); do for SIZE in $((DIMENSIONS[0] - WIDESORT[0])) $((DIMENSIONS[0] + WIDESORT[0])); do
(( SIZE > 0 && (SIZE & (SIZE - 1)) == 0 )) && RESIZE=${SIZE} (( SIZE > 0 && (SIZE & (SIZE - 1)) == 0 )) && RESIZE=${SIZE}
done done

Loading…
Cancel
Save