From 8e01c00a60793fcb4793df44ffc18a184e8fc20e Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Mon, 11 Mar 2013 19:31:52 +0100 Subject: [PATCH] add an white border to the source image so if the images goes to the corners it will have an white border to work on on convertiong the white to transparent --- lib/builder-utils.sh | 11 +++++++---- .../installer/nolicense/CLIENT_DATA/delsub3264.ins | 6 ------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/builder-utils.sh b/lib/builder-utils.sh index 97c11ed..6932a41 100644 --- a/lib/builder-utils.sh +++ b/lib/builder-utils.sh @@ -148,12 +148,15 @@ convert_image() { local wight=`${CMD_identify} -format "%w" $src` ${CMD_identify} -format "%wx%h" $src + # Add a white border to the image so that the convert to stansparent can go around an image + convert -bordercolor White -border 3x3 $src $OUTPUT_DIR/bigger.png + # first resize the image to the new aspect ratio and add white borders if [ $wight -lt $hight ] ; then # Its higher so force x160 and let imagemagic decide the right wight # then add white to the rest of the image to fit 160x160 log_debug "Icon Wight: $wight < Hight: $hight" - convert $src -colorspace RGB -resize x160 \ + convert $OUTPUT_DIR/bigger.png -colorspace RGB -resize x160 \ -size 160x160 xc:white +swap -gravity center -composite \ -modulate 110 -colors 256 png8:$OUTPUT_DIR/resize.png builder_check_error "converting image" @@ -161,14 +164,14 @@ convert_image() { # Its wider so force 160x and let imagemagic decide the right hight # then add white to the rest of the image to fit 160x160 log_debug "Icon Wight: $wight > Hight: $hight" - convert $src -colorspace RGB -resize 160x \ + convert $OUTPUT_DIR/bigger.png -colorspace RGB -resize 160x \ -size 160x160 xc:white +swap -gravity center -composite \ -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 \ + convert $OUTPUT_DIR/bigger.png -colorspace RGB -resize 160x160 \ -size 160x160 xc:white +swap -gravity center -composite \ -modulate 110 -colors 256 png8:$OUTPUT_DIR/resize.png builder_check_error "converting image" @@ -176,7 +179,7 @@ convert_image() { # Imagemagic is unable to detect the aspect ratio so just force 160x160 # this could result in streched images log_debug "Icon Wight: $wight unknown Hight: $hight" - convert $src -colorspace RGB -resize 160x160 \ + convert $OUTPUT_DIR/bigger.png -colorspace RGB -resize 160x160 \ -size 160x160 xc:white +swap -gravity center -composite \ -modulate 110 -colors 256 png8:$OUTPUT_DIR/resize.png builder_check_error "converting image" diff --git a/sample/32bit64/installer/nolicense/CLIENT_DATA/delsub3264.ins b/sample/32bit64/installer/nolicense/CLIENT_DATA/delsub3264.ins index f742775..514d219 100644 --- a/sample/32bit64/installer/nolicense/CLIENT_DATA/delsub3264.ins +++ b/sample/32bit64/installer/nolicense/CLIENT_DATA/delsub3264.ins @@ -120,12 +120,6 @@ delete -sf "$InstallDir32$\" ; === Inno Setup ======================================================================================== ; "$UninstallProgram64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel -[Winbatch_uninstall_msi_old_64] -msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress - -[Winbatch_uninstall_msi_64] -msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress - [Files_uninstall_64] ; Example for recursively deleting the installation directory: ;