image: Make (--size none) keep original image aspect ratio.
This commit is contained in:
parent
8540a2f1e3
commit
c43ffb028e
6
neofetch
6
neofetch
|
@ -2690,6 +2690,12 @@ get_image_size() {
|
||||||
width="${size%% *}"
|
width="${size%% *}"
|
||||||
height="${size##* }"
|
height="${size##* }"
|
||||||
crop_mode="none"
|
crop_mode="none"
|
||||||
|
|
||||||
|
while (( "$width" >= ("$term_width" / 2) ||
|
||||||
|
"$height" >= "$term_height" )); do
|
||||||
|
width="$((width / 2))"
|
||||||
|
height="$((height / 2))"
|
||||||
|
done
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*) image_size="${image_size/px}" ;;
|
*) image_size="${image_size/px}" ;;
|
||||||
|
|
Reference in New Issue