summaryrefslogtreecommitdiff
path: root/prepare
diff options
context:
space:
mode:
Diffstat (limited to 'prepare')
-rwxr-xr-xprepare25
1 files changed, 16 insertions, 9 deletions
diff --git a/prepare b/prepare
index b1c3aa1..4cf6843 100755
--- a/prepare
+++ b/prepare
@@ -103,12 +103,13 @@ TYPE="jpg";
# Table rows MUST BE SORTED FROM GREATEST TO LEAST.
#
MAKE=$(grep -v ^# <<EOF
-4:3 640 400 256 200
-5:4 480 256
-3:2 854
+21:9 122
16:10 160 120 105 80
16:9 240 160 120 90
-21:9 122
+8:5 200
+5:4 480 256
+4:3 640 400 256 200
+3:2 854
EOF
);
@@ -237,14 +238,9 @@ size_only ()
y=$((${k}*${size#*:}));
printf " - Generating %4sx%4s (scale: %s)\n" "${x}" "${y}" "${k}";
-
# resized
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";
- gm convert "${image}/${from_x}x${from_y}.png" -resize 400x250^ "${KEEP}"/${name}/screenshot.jpg 2>/dev/null;
done
}
@@ -419,6 +415,17 @@ done
#---------------------------------------------------------------
+# output: screenshots
+#---------------------------------------------------------------
+
+find "${TEMP}"/generated -mindepth 1 -maxdepth 1 -type d | sort | while read k; do
+ name=$(printf "%s\n" "${k}" | cut -d/ -f3); # sloppy, sorry
+ printf "Generating screenshot ('%s')...\n" "${KEEP}/${name}/screenshot.jpg";
+ gm convert "${k}"/1600x1000.png -resize 400x250^ "${KEEP}"/${name}/screenshot.jpg 2>/dev/null;
+done
+
+
+#---------------------------------------------------------------
# output: metadata
#---------------------------------------------------------------