image: Make (--size none) keep original image aspect ratio.
This commit is contained in:
parent
8540a2f1e3
commit
c43ffb028e
1 changed files with 6 additions and 0 deletions
6
neofetch
6
neofetch
|
@ -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}" ;;
|
||||
|
|
Loading…
Reference in a new issue