Skip to content

Commit

Permalink
Fix deprecation warning of convert
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackjacx committed Oct 22, 2024
1 parent e1d19b7 commit 4bbb073
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions xcode/iconizer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ generateImages() {
}

generateImage() {
image=$(jq ".images[$1]" $CONTENTS_PATH)
image=$(jq ".images[$1]" "$CONTENTS_PATH")

scale=$(echo $image | jq -r ".scale" | cut -d "x" -f 1)
scale=$(echo "$image" | jq -r ".scale" | cut -d "x" -f 1)
[ $scale != "null" ] || scale=1

sizePT=$(echo $image | jq -r ".size" | cut -d "x" -f 1)
sizePT=$(echo "$image" | jq -r ".size" | cut -d "x" -f 1)
sizePX=$(bc -l <<<"scale=1; $sizePT*$scale" | cut -d "." -f 1)
newFileName="appicon_${sizePX}.png"

Expand All @@ -62,7 +62,7 @@ generateImage() {
echo "File $newFileName already created... Continue ✅"
else
echo -n "Generating $newFileName"
convert -density 400 "$PDF_PATH" -scale "$sizePX" "$APP_ICON_SET_PATH/$newFileName"
magick -density 400 "$PDF_PATH" -scale "$sizePX" "$APP_ICON_SET_PATH/$newFileName"
echo ""
fi
}
Expand Down

0 comments on commit 4bbb073

Please sign in to comment.