From 8b3336d971999f6574bfb569fa0514bc244152f0 Mon Sep 17 00:00:00 2001 From: Tigriz <646-Tigriz@users.noreply.git.iiens.net> Date: Fri, 18 Sep 2020 16:04:28 +0200 Subject: [PATCH] Update matrixpack.sh for gifs --- matrixpack.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/matrixpack.sh b/matrixpack.sh index 6be03ac..9d0ad59 100755 --- a/matrixpack.sh +++ b/matrixpack.sh @@ -53,8 +53,8 @@ do if [ -f "$f" ]; then # Resizing large images - width=$(identify -format "%w" "$f")> /dev/null - height=$(identify -format "%h" "$f")> /dev/null + width=$(identify -format "%w" "$f"[0])> /dev/null + height=$(identify -format "%h" "$f"[0])> /dev/null if [ $width -gt 256 ]; then width="256"; fi @@ -90,8 +90,8 @@ do # Calculating 128x128> format convert "$slug/tmp/$f.$type" -resize "128x128" "$slug/tmp/size" - width=$(identify -format "%w" "$slug/tmp/size")> /dev/null - height=$(identify -format "%h" "$slug/tmp/size")> /dev/null + width=$(identify -format "%w" "$slug/tmp/size"[0])> /dev/null + height=$(identify -format "%h" "$slug/tmp/size"[0])> /dev/null # Appending to json echo -n "{\"body\":\"$f\",\"info\":{\"mimetype\":\"image/$type\",\"h\":$height,\"w\":$width,\"thumbnail_url\":\"$mxc\"},\"msgtype\":\"m.sticker\",\"url\":\"$mxc\",\"id\":\"$packname-$f\"}" >> "$slug/$slug.json" first="," -- GitLab