From cba43e51cfb570d94a574516818f037741175ed0 Mon Sep 17 00:00:00 2001
From: Elliu <goyard.louis@gmail.com>
Date: Wed, 24 Feb 2021 00:34:02 +0100
Subject: [PATCH] Taking only the first frame of a gif to determine the width
 and height (to prevent concatenation of sizes)

---
 stpkg | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/stpkg b/stpkg
index 977475b..79372f7 100755
--- a/stpkg
+++ b/stpkg
@@ -732,8 +732,8 @@ __pack() {
         local INIT_WIDTH=$WIDTH
         local INIT_HEIGHT=$HEIGHT
         picture_resize_preview "$DEST" "$NAME"
-        local WIDTH=$( identify -format "%w" "$DEST") >/dev/null
-        local HEIGHT=$(identify -format "%h" "$DEST") >/dev/null
+        local WIDTH=$( identify -format "%w" "$DEST[0]") >/dev/null
+        local HEIGHT=$(identify -format "%h" "$DEST[0]") >/dev/null
 
         # Add the sticker to the index file
         create_sticker_json "$PACK_NAME" "$NAME" "$WIDTH" "$HEIGHT" "$TYPE" "$MXC" >> $DEST_INDEX
-- 
GitLab