Commit c43ffb02 authored by dylan araps's avatar dylan araps

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

parent 8540a2f1
......@@ -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}" ;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment