diff options
author | xyz <gky44px1999@gmail.com> | 2021-08-13 02:43:35 -0700 |
---|---|---|
committer | xyz <gky44px1999@gmail.com> | 2021-08-13 02:43:35 -0700 |
commit | 3d75fadace421bf3768ae901a5825f86b04ce614 (patch) | |
tree | c92a1173986a80c32fd7e5bf9b0922bf2ba85868 /.local/bin | |
parent | 937b047c2a08e99cfd2a329d94ed34a041b9744a (diff) |
use -ping for identify, faster
Diffstat (limited to '.local/bin')
-rwxr-xr-x | .local/bin/convwall | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/.local/bin/convwall b/.local/bin/convwall index 7ef49a9f..286e85a8 100755 --- a/.local/bin/convwall +++ b/.local/bin/convwall @@ -6,8 +6,10 @@ hratio=$SCRHEIGHT # chop how much from center chopnum=99% -width=$(identify -format '%w' "$1") -height=$(identify -format '%h' "$1") +# my benchmark shows -ping is much faster than default +# https://github.com/ImageMagick/ImageMagick/issues/3183#issuecomment-800955241 +width=$(identify -ping -format '%w' "$1") +height=$(identify -ping -format '%h' "$1") ratio=$((wratio*100/hratio)) dim=$((width*100/height)) |