From a8dd27b7678d26135ccceaa8ebd061050df47e09 Mon Sep 17 00:00:00 2001 From: Elliu <elliu@hashi.re> Date: Fri, 22 Oct 2021 17:00:28 +0200 Subject: [PATCH] Take only the dimension of the first frame of a gif --- stpkg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stpkg b/stpkg index cc75fc7..cbbfbc7 100755 --- a/stpkg +++ b/stpkg @@ -160,13 +160,13 @@ validate_homeserv() { } file_get_width() { - local WIDTH=$(identify -format "%w" "$1") >/dev/null + local WIDTH=$(identify -format "%w" "$1[0]") >/dev/null local WIDTH=$(( $WIDTH > 256 ? 256 : $WIDTH )) echo "$WIDTH" } file_get_height() { - local HEIGHT=$(identify -format "%h" "$1") >/dev/null + local HEIGHT=$(identify -format "%h" "$1[0]") >/dev/null local HEIGHT=$(( $HEIGHT > 256 ? 256 : $HEIGHT )) echo "$HEIGHT" } -- GitLab