diff --git a/contrib/faces/image2card.sh b/contrib/faces/image2card.sh index 6064bae..0398e87 100755 --- a/contrib/faces/image2card.sh +++ b/contrib/faces/image2card.sh @@ -38,7 +38,11 @@ imagefile="$1" fullname="$2" -imgdata=$(convert "${imagefile}" -resize '40x40!' - | base64 -w 0) +base64switch="" +base64check=$(echo "jj" | base64 -w 0 > /dev/null 2>&1) +[ "$?" -eq "0" ] && base64switch="-w 0" +imgdata=$(convert "${imagefile}" -resize '40x40!' - | base64 $base64switch) + cat <