Skip to content

Commit 18febbe

Browse files
author
lb@lb7520
committed
cardconv updated.
png images converted from gifs by IM resulted in an indexed png format. This lead to Problems with tranparency, especially with ganijfa and hanafuda cardsets. To circumvent these problems IM had to be advised to produce 32 bit mode rgba format. affects android apk build process only.
1 parent 5b75c1b commit 18febbe

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

scripts/cardconv

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,15 @@ convdir() {
3434
mkdir -p "$2"
3535

3636
# Convert all images
37-
for i in $1/*.$ifo; do
38-
convert "$i" "$2/$(basename $i .$ifo).$ofo"
39-
done
37+
if [ $ofo == 'png' ]; then
38+
for i in $1/*.$ifo; do
39+
convert "$i" "-matte" "-quality" "95" "png32:$2/$(basename $i .$ifo).$ofo"
40+
done
41+
else
42+
for i in $1/*.$ifo; do
43+
convert "$i" "$2/$(basename $i .$ifo).$ofo"
44+
done
45+
fi
4046

4147
# Convert config.txt
4248
if [ -f $1/config.txt ]; then

0 commit comments

Comments
 (0)