Skip to content
Extraits de code Groupes Projets
Valider bb93b9e6 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

Now register the MXC in the pack's json

parent beb0095d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -195,7 +195,9 @@ picture_process_sticker() {
local HEIGHT=$5 # The HEIGHT!
local TYPE=$6 # The type of the file (png/gif)
local OPTS=`[ "$TYPE" = "png" ] && echo '-type TrueColor PNG32:' || echo ''`
local OPTS=`[ "$TYPE" = "png" ] && echo '-type TrueColor PNG32:' || echo ' -coalesce '`
info "File '$FILE' => '$DEST' ($TYPE) | OPTS = '$OPTS'"
convert "$FILE" -bordercolor none -border 1 "$DEST" 1>&2 && progress_dot || die "$NAME failed on border"
convert "$DEST" -trim +repage "$DEST" 1>&2 && progress_dot || die "$NAME failed on trim"
......@@ -597,7 +599,7 @@ __edit() {
local DEST=$(mktemp --suffix=".$TYPE")
picture_process_sticker "$FILE" "$DEST" "$NAME" "$WIDTH" "$HEIGHT" "$TYPE" # Transform sticker picture (see __pack)
upload_file "$TYPE" "$DEST" "$NAME" # Upload transformed file (see __pack)
local MXC=$(upload_file "$TYPE" "$DEST" "$NAME") # Upload transformed file (see __pack)
jq "del(.stickers[] | select(.body == \"$STICKER_NAME\"))" < "$TEMP" | sponge "$TEMP"
local ST_JSON=$(create_sticker_json "$PACK_NAME" "$NAME" "$WIDTH" "$HEIGHT" "$TYPE" "$MXC")
......@@ -723,7 +725,7 @@ __pack() {
echo -n "$FIRST_IN_ARRAY" >> $DEST_INDEX
# Upload the transformed file
upload_file "$TYPE" "$DEST" "$NAME"
local MXC=$(upload_file "$TYPE" "$DEST" "$NAME")
progress_dot
# Calculate the 128x128 format
......
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