Skip to content

Commit

Permalink
Convert images with pillow instead of imagemagick
Browse files Browse the repository at this point in the history
  • Loading branch information
datagutten committed Jul 6, 2024
1 parent 086f907 commit 191e70d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,6 @@ jobs:
sudo cp /var/cache/apt/*.bin /tmp/apt
sudo cp -r /var/cache/apt/archives/*.deb /tmp/apt/archives
- name: Install imagemagick
run: |
sudo add-apt-repository universe
sudo apt install libfuse2
deployment/imagemagick.sh
echo "$PWD/bin" >> $GITHUB_PATH
- run: npm install

- run: pip install -r requirements.txt
Expand Down
7 changes: 4 additions & 3 deletions assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
from PyTexturePacker import Utils as PyTexturePackerUtils

from audiosprite import AudioSprite
from build_scripts.parse_animation_chart import parse_animation_chart
from build_scripts.MulleResource import MulleResource
from build_scripts.convert_image import convert_image
from build_scripts.data import director_data
from build_scripts.parse_animation_chart import parse_animation_chart

optimizeImages = int(sys.argv[1])

Expand Down Expand Up @@ -349,9 +350,9 @@
continue

if f['num'] in opaque:
call(["magick", "convert", fileBasePath + '.bmp', fileBasePath + '.png'])
convert_image(fileBasePath + '.bmp', False)
else:
call(["magick", "convert", fileBasePath + '.bmp', "-transparent", "#FFFFFF", fileBasePath + '.png'])
convert_image(fileBasePath + '.bmp')

filePath = fileBasePath + ".png"

Expand Down

0 comments on commit 191e70d

Please sign in to comment.