From 18febbe24016fe03e9d7713e79902e01e5aec760 Mon Sep 17 00:00:00 2001 From: "lb@lb7520" Date: Tue, 13 Aug 2019 10:00:49 +0200 Subject: [PATCH] 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. --- scripts/cardconv | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/cardconv b/scripts/cardconv index d165a1e1..9c0da049 100755 --- a/scripts/cardconv +++ b/scripts/cardconv @@ -34,9 +34,15 @@ convdir() { mkdir -p "$2" # Convert all images - for i in $1/*.$ifo; do - convert "$i" "$2/$(basename $i .$ifo).$ofo" - done + if [ $ofo == 'png' ]; then + for i in $1/*.$ifo; do + convert "$i" "-matte" "-quality" "95" "png32:$2/$(basename $i .$ifo).$ofo" + done + else + for i in $1/*.$ifo; do + convert "$i" "$2/$(basename $i .$ifo).$ofo" + done + fi # Convert config.txt if [ -f $1/config.txt ]; then