summaryrefslogtreecommitdiff
path: root/prepare
diff options
context:
space:
mode:
Diffstat (limited to 'prepare')
-rwxr-xr-xprepare22
1 files changed, 10 insertions, 12 deletions
diff --git a/prepare b/prepare
index 16d000a..b1c3aa1 100755
--- a/prepare
+++ b/prepare
@@ -124,7 +124,7 @@ cd "${HERE}";
##
# Check for required tools.
#
-for k in curl composite convert; do
+for k in curl gm; do
if ! command -v ${k} 2>&1 >/dev/null; then
printf "E: required utility '%s' not found!\n" "${k}";
exit 1;
@@ -239,12 +239,12 @@ size_only ()
# resized
- convert "${image}/${from_x}x${from_y}.png" -resize ${x}x${y}^ "${KEEP}"/${name}/${x}x${y}.${type};
+ gm convert "${image}/${from_x}x${from_y}.png" -resize ${x}x${y}^ "${KEEP}"/${name}/${x}x${y}.${type} 2>/dev/null;
done
# screenshot
printf " - Generating screenshot\n";
- convert "${image}/${from_x}x${from_y}.png" -resize 400x250^ "${KEEP}"/${name}/screenshot.jpg;
+ gm convert "${image}/${from_x}x${from_y}.png" -resize 400x250^ "${KEEP}"/${name}/screenshot.jpg 2>/dev/null;
done
}
@@ -293,27 +293,25 @@ make_fake ()
args="${@}"; # all remaining arguments
printf "Generating %5s ('%s')...\n" "${size}" "${name}";
- convert \
- -define gradient:angle=65 \
+ gm convert \
+ -define gradient:direction=NorthEast \
-size ${size} \
gradient:"${hexa}"-"${hexb}" \
"${name}" \
;
# FIXME: this is literal magic?
- composite \
- \( \
+ gm composite \
-compose atop \
-gravity southwest \
-background none \
-resize ${size%x*}x$((${size#*x}*80/100)) \
"${TEMP}"/polyguin.svg \
-geometry +0+100 \
- \) \
"${name}" \
"${name}" \
;
- composite \
+ gm composite \
-compose atop \
-gravity southeast \
-background none \
@@ -322,7 +320,7 @@ make_fake ()
"${name}" \
"${name}" \
;
- convert \
+ gm convert \
${args} \
"${name}" \
"${name}" \
@@ -345,7 +343,7 @@ printf "%s\n" "${MAKE}" | while read ratio scale _; do
"#bbbbbb" "#eeeeee" \
black_x200 \
"${TEMP}"/generated/background/${x}x${y}.png \
- -colorspace Gray -separate -average \
+ -colorspace Gray \
;
# lockscreen (full color)
@@ -375,7 +373,7 @@ make_real ()
# TODO: add filename extension checker?
printf "Generating %5s ('%s')...\n" "${size}" "${name}";
- convert "${file}" -resize ${size}^ "${name}";
+ gm convert "${file}" -resize ${size}^ "${name}" 2>/dev/null;
}