diff --git a/lib/builder-utils.sh b/lib/builder-utils.sh index e9e8d7b..687b880 100644 --- a/lib/builder-utils.sh +++ b/lib/builder-utils.sh @@ -141,7 +141,7 @@ convert_image() { log_debug "Icon Wight: $wight < Hight: $hight" convert $src -colorspace RGB -resize x160 \ -size 160x160 xc:white +swap -gravity center -composite \ - -modulate 110 -colors 256 $OUTPUT_DIR/resize.png + -modulate 110 -colors 256 png8:$OUTPUT_DIR/resize.png builder_check_error "converting image" elif [ $wight -gt $hight ] ; then # Its wider so force 160x and let imagemagic decide the right hight @@ -149,14 +149,14 @@ convert_image() { log_debug "Icon Wight: $wight > Hight: $hight" convert $src -colorspace RGB -resize 160x \ -size 160x160 xc:white +swap -gravity center -composite \ - -modulate 110 -colors 256 $OUTPUT_DIR/resize.png + -modulate 110 -colors 256 png8:$OUTPUT_DIR/resize.png builder_check_error "converting image" elif [ $wight -eq $hight ] ; then # Its scare so force 160x160 log_debug "Icon Wight: $wight = Hight: $hight" convert $src -colorspace RGB -resize 160x160 \ -size 160x160 xc:white +swap -gravity center -composite \ - -modulate 110 -colors 256 $OUTPUT_DIR/resize.png + -modulate 110 -colors 256 png8:$OUTPUT_DIR/resize.png builder_check_error "converting image" else # Imagemagic is unable to detect the aspect ratio so just force 160x160 @@ -164,7 +164,7 @@ convert_image() { log_debug "Icon Wight: $wight unknown Hight: $hight" convert $src -colorspace RGB -resize 160x160 \ -size 160x160 xc:white +swap -gravity center -composite \ - -modulate 110 -colors 256 $OUTPUT_DIR/resize.png + -modulate 110 -colors 256 png8:$OUTPUT_DIR/resize.png builder_check_error "converting image" fi