From 1352e032fbb91c6d8dcafcf5ca328e88265a1538 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Sun, 12 Feb 2012 08:20:08 +0100 Subject: [PATCH] make the imgae brighter --- lib/builder-utils.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/builder-utils.sh b/lib/builder-utils.sh index 94a9844..1bad273 100644 --- a/lib/builder-utils.sh +++ b/lib/builder-utils.sh @@ -138,31 +138,32 @@ convert_image() { # Its higher so force x160 and let imagemagic decide the right wight # then add transparency to the rest of the image to fit 160x160 log_debug "Icon Wight: $wight < Hight: $hight" - convert $src -colorspace RGB -transparent white -background transparent \ + convert $src -colorspace sRGB -transparent white -background transparent \ -resize x160 -size 160x160 xc:transparent +swap -gravity center \ - -composite $dst + -composite -modulate 110 $dst builder_check_error "converting image" elif [ $wight -gt $hight ] ; then # Its wider so force 160x and let imagemagic decide the right hight # then add transparency to the rest of the image to fit 160x160 log_debug "Icon Wight: $wight > Hight: $hight" - convert $src -colorspace RGB -transparent white -background transparent \ + convert $src -colorspace sRGB -transparent white -background transparent \ -resize 160x -size 160x160 xc:transparent +swap -gravity center \ - -composite $dst + -composite -modulate 110 $dst 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 -transparent white -background transparent \ + convert $src -colorspace sRGB -transparent white -background transparent \ -resize 160x160 -size 160x160 xc:transparent +swap -gravity center \ - -composite $dst + -composite -modulate 110 $dst builder_check_error "converting image" else # 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 -transparent white -background transparent \ - -resize 160x160 xc:transparent +swap -gravity center -composite $dst + convert $src -colorspace sRGB -transparent white -background transparent \ + -resize 160x160 xc:transparent +swap -gravity center -composite \ + -modulate 110 $dst builder_check_error "converting image" fi