Skip to content

Commit

Permalink
Fix imagemagick 7 deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Ваше Имя committed Jun 16, 2024
1 parent 84dff44 commit eaa270c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions android/generate_assets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ convert_image()
QUALITY_CMD="-quality $PNG_QUALITY"
fi

convert $SCALE_CMD $QUALITY_CMD "$FILE" "tmp.$FILE_TYPE"
magick "$FILE" $SCALE_CMD $QUALITY_CMD "tmp.$FILE_TYPE"

if [ -s "tmp.$FILE_TYPE" ]; then
SIZE_OLD=`du -k "$FILE" | cut -f1`
Expand Down Expand Up @@ -419,7 +419,7 @@ convert_to_jpg()
fi

# We can check if new file is smaller
convert -quality $JPEG_QUALITY "$FILE" "$NEW_FILE"
magick "$FILE" -quality $JPEG_QUALITY "$NEW_FILE"
rm -f "$FILE"

echo "$FILE" >> "./converted_textures"
Expand Down
46 changes: 23 additions & 23 deletions android/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -408,29 +408,29 @@ cp -f "$DIRNAME/../lib/sdl2/android-project/app/src/main/java/org/libsdl/app/SDL

cp "banner.png" "$DIRNAME/res/drawable/banner.png"
cp "$APP_ICON" "$DIRNAME/res/drawable/icon.png"
convert -scale 48x48 "$APP_ICON" "$DIRNAME/res/drawable-mdpi/icon.png"
convert -scale 72x72 "$APP_ICON" "$DIRNAME/res/drawable-hdpi/icon.png"
convert -scale 96x96 "$APP_ICON" "$DIRNAME/res/drawable-xhdpi/icon.png"
convert -scale 144x144 "$APP_ICON" "$DIRNAME/res/drawable-xxhdpi/icon.png"
convert -scale 192x192 "$APP_ICON" "$DIRNAME/res/drawable-xxxhdpi/icon.png"

#convert -scale 108x108 "$APP_ICON_ADAPTIVE_BG" "$DIRNAME/res/drawable-mdpi/icon_bg.png"
#convert -scale 162x162 "$APP_ICON_ADAPTIVE_BG" "$DIRNAME/res/drawable-hdpi/icon_bg.png"
#convert -scale 216x216 "$APP_ICON_ADAPTIVE_BG" "$DIRNAME/res/drawable-xhdpi/icon_bg.png"
#convert -scale 324x324 "$APP_ICON_ADAPTIVE_BG" "$DIRNAME/res/drawable-xxhdpi/icon_bg.png"
#convert -scale 432x432 "$APP_ICON_ADAPTIVE_BG" "$DIRNAME/res/drawable-xxxhdpi/icon_bg.png"

convert -scale 108x108 xc:"rgba(255,255,255,255)" "$DIRNAME/res/drawable-mdpi/icon_bg.png"
convert -scale 162x162 xc:"rgba(255,255,255,255)" "$DIRNAME/res/drawable-hdpi/icon_bg.png"
convert -scale 216x216 xc:"rgba(255,255,255,255)" "$DIRNAME/res/drawable-xhdpi/icon_bg.png"
convert -scale 324x324 xc:"rgba(255,255,255,255)" "$DIRNAME/res/drawable-xxhdpi/icon_bg.png"
convert -scale 432x432 xc:"rgba(255,255,255,255)" "$DIRNAME/res/drawable-xxxhdpi/icon_bg.png"

convert -scale 108x108 "$APP_ICON_ADAPTIVE_FG" "$DIRNAME/res/drawable-mdpi/icon_fg.png"
convert -scale 162x162 "$APP_ICON_ADAPTIVE_FG" "$DIRNAME/res/drawable-hdpi/icon_fg.png"
convert -scale 216x216 "$APP_ICON_ADAPTIVE_FG" "$DIRNAME/res/drawable-xhdpi/icon_fg.png"
convert -scale 324x324 "$APP_ICON_ADAPTIVE_FG" "$DIRNAME/res/drawable-xxhdpi/icon_fg.png"
convert -scale 432x432 "$APP_ICON_ADAPTIVE_FG" "$DIRNAME/res/drawable-xxxhdpi/icon_fg.png"
magick "$APP_ICON" -scale 48x48 "$DIRNAME/res/drawable-mdpi/icon.png"
magick "$APP_ICON" -scale 72x72 "$DIRNAME/res/drawable-hdpi/icon.png"
magick "$APP_ICON" -scale 96x96 "$DIRNAME/res/drawable-xhdpi/icon.png"
magick "$APP_ICON" -scale 144x144 "$DIRNAME/res/drawable-xxhdpi/icon.png"
magick "$APP_ICON" -scale 192x192 "$DIRNAME/res/drawable-xxxhdpi/icon.png"

#magick "$APP_ICON_ADAPTIVE_BG" -scale 108x108 "$DIRNAME/res/drawable-mdpi/icon_bg.png"
#magick "$APP_ICON_ADAPTIVE_BG" -scale 162x162 "$DIRNAME/res/drawable-hdpi/icon_bg.png"
#magick "$APP_ICON_ADAPTIVE_BG" -scale 216x216 "$DIRNAME/res/drawable-xhdpi/icon_bg.png"
#magick "$APP_ICON_ADAPTIVE_BG" -scale 324x324 "$DIRNAME/res/drawable-xxhdpi/icon_bg.png"
#magick "$APP_ICON_ADAPTIVE_BG" -scale 432x432 "$DIRNAME/res/drawable-xxxhdpi/icon_bg.png"

magick xc:"rgba(255,255,255,255)" -scale 108x108 "$DIRNAME/res/drawable-mdpi/icon_bg.png"
magick xc:"rgba(255,255,255,255)" -scale 162x162 "$DIRNAME/res/drawable-hdpi/icon_bg.png"
magick xc:"rgba(255,255,255,255)" -scale 216x216 "$DIRNAME/res/drawable-xhdpi/icon_bg.png"
magick xc:"rgba(255,255,255,255)" -scale 324x324 "$DIRNAME/res/drawable-xxhdpi/icon_bg.png"
magick xc:"rgba(255,255,255,255)" -scale 432x432 "$DIRNAME/res/drawable-xxxhdpi/icon_bg.png"

magick "$APP_ICON_ADAPTIVE_FG" -scale 108x108 "$DIRNAME/res/drawable-mdpi/icon_fg.png"
magick "$APP_ICON_ADAPTIVE_FG" -scale 162x162 "$DIRNAME/res/drawable-hdpi/icon_fg.png"
magick "$APP_ICON_ADAPTIVE_FG" -scale 216x216 "$DIRNAME/res/drawable-xhdpi/icon_fg.png"
magick "$APP_ICON_ADAPTIVE_FG" -scale 324x324 "$DIRNAME/res/drawable-xxhdpi/icon_fg.png"
magick "$APP_ICON_ADAPTIVE_FG" -scale 432x432 "$DIRNAME/res/drawable-xxxhdpi/icon_fg.png"

export ANDROID_HOME="$SDK_PATH"
./gradlew -Pcompile_sdk_version="$COMPILE_SDK_VERSION" \
Expand Down

0 comments on commit eaa270c

Please sign in to comment.