Skip to content

Instantly share code, notes, and snippets.

@Wikinaut
Last active December 9, 2024 08:35
Show Gist options
  • Save Wikinaut/b4e53c6a76febc604dfa371bd8b0ff1f to your computer and use it in GitHub Desktop.
Save Wikinaut/b4e53c6a76febc604dfa371bd8b0ff1f to your computer and use it in GitHub Desktop.
make-polaroid: create a polaroid-stylish n x m poster
#!/bin/bash
title="$3"
resolution="1000"
tile="$1x$2"
rm polaroid*.png
rm polaroid-reduced.*
tfile="$(mktemp /tmp/montage.temp.XXXXXXXXX)" || exit 1
#montage $(ls *.webp *.jp* *.png) \
# -thumbnail ${resolution}x${resolution}+15+15 \
# -thumbnail ${resolution}x${resolution} \
# -set caption %f -background grey40 -pointsize 40 -font Hack-Regular \
# -polaroid 0 -background white -geometry +10+10 -tile $tile -title "$title" -pointsize 60 \
# polaroid.png
ls -1 -Q *.webp *.jp* *.png > $tfile
cat $tfile
montage @$tfile \
-auto-orient \
-tile $tile -background white -geometry 2000x+10+10 \
-title "$title" -background white -pointsize 8 -font Hack-Bold \
-set caption '%t' -background grey40 -pointsize 80 -font Hack-Regular \
-polaroid 0 -background white \
polaroid.png
convert polaroid.png -quality 100% -resize @10000000 polaroid-reduced.jpg
# -tile $tile -background white -shadow -geometry 800x800+20+20 \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment