summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Fetka <[email protected]>2012-02-12 06:55:30 (GMT)
committer Mario Fetka <[email protected]>2012-02-12 06:55:30 (GMT)
commita237b47cfde9136c0032e647f372a13b7c0bcf1e (patch)
treeb83e8e2e09755065fde3df33551af75efbb7c5e2
parenta045ccb81704c9533fb839be38344c424418c541 (diff)
force -colorspace RGB on created images
-rw-r--r--lib/builder-utils.sh19
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/builder-utils.sh b/lib/builder-utils.sh
index 9c8f3b9..737c65a 100644
--- a/lib/builder-utils.sh
+++ b/lib/builder-utils.sh
@@ -138,28 +138,31 @@ 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 -transparent white -background transparent -resize x160 \
- -size 160x160 xc:transparent +swap -gravity center -composite $dst
+ convert -colorspace RGB $src -transparent white -background transparent \
+ -resize x160 -size 160x160 xc:transparent +swap -gravity center \
+ -composite $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 -transparent white -background transparent -resize 160x \
- -size 160x160 xc:transparent +swap -gravity center -composite $dst
+ convert -colorspace RGB $src -transparent white -background transparent \
+ -resize 160x -size 160x160 xc:transparent +swap -gravity center \
+ -composite $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 -transparent white -background transparent -resize 160x160 \
- -size 160x160 xc:transparent +swap -gravity center -composite $dst
+ convert -colorspace RGB $src -transparent white -background transparent \
+ -resize 160x160 -size 160x160 xc:transparent +swap -gravity center \
+ -composite $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 -transparent white -background transparent -resize 160x160 \
- xc:transparent +swap -gravity center -composite $dst
+ convert -colorspace RGB $src -transparent white -background transparent \
+ -resize 160x160 xc:transparent +swap -gravity center -composite $dst
builder_check_error "converting image"
fi

Powered by Domaintechnik.at | Hosting - Domain - Webspace