summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-07-22 12:22:07 +0200
committerTor Andersson <tor@ccxvii.net>2021-07-25 14:04:02 +0200
commit30537163ab5cf80500994bb1cad82b9c240eb9a2 (patch)
treed86e789175802289408ea476e5b8d8a300fb2a1a /tools
parent0a31de8125b4050dca9d805423252738c14b982d (diff)
downloadserver-30537163ab5cf80500994bb1cad82b9c240eb9a2.tar.gz
Add original size covers to tool directories.
Diffstat (limited to 'tools')
-rw-r--r--tools/thumbnail.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/thumbnail.sh b/tools/thumbnail.sh
new file mode 100644
index 0000000..e4a10ee
--- /dev/null
+++ b/tools/thumbnail.sh
@@ -0,0 +1,7 @@
+mogrify -resize 300x300 -format ppm */cover.jpg
+for F in tools/*/cover.jpg
+do
+ OUT=public/*$(dirname $F | sed 's,tools/,,;s/-.*//')*
+ echo Thumbnail $OUT/cover.jpg $F
+ djpeg $F | pnmscale -xysize 400 400 | mozjpeg -q 90 > $OUT/cover.jpg
+done