image: Make (--size none) keep original image aspect ratio.

This commit is contained in:
dylan araps 2017-12-13 10:29:14 +11:00
parent 8540a2f1e3
commit c43ffb028e

View file

@ -2690,6 +2690,12 @@ get_image_size() {
width="${size%% *}"
height="${size##* }"
crop_mode="none"
while (( "$width" >= ("$term_width" / 2) ||
"$height" >= "$term_height" )); do
width="$((width / 2))"
height="$((height / 2))"
done
;;
*) image_size="${image_size/px}" ;;