Skip to content
Extraits de code Groupes Projets
Valider 4efdd0f7 rédigé par Miryuni's avatar Miryuni
Parcourir les fichiers

Oublié de supprimer les commentaires

parent 6e78b93b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -120,6 +120,10 @@ do
type="gif"
opts=""
fi
# Erase the extension of the image
sticker_name=$(echo "$f" | cut -f 1 -d '.')
# Trim, resize and remove indexed palette from image
echo -n "trimming and resizing"
convert "$f" -bordercolor none -border 1 "$slug/tmp/$f.$type"
......@@ -143,7 +147,7 @@ do
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"
echo -n "{\"body\":\"$sticker_name\",\"info\":{\"mimetype\":\"image/$type\",\"h\":$height,\"w\":$width,\"thumbnail_url\":\"$mxc\"},\"msgtype\":\"m.sticker\",\"url\":\"$mxc\",\"id\":\"$packname-$sticker_name\"}" >> "$slug/$slug.json"
first=","
echo -e ". \033[92msuccess\033[0m!"
fi
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter