Last active
December 9, 2024 08:35
-
-
Save Wikinaut/b4e53c6a76febc604dfa371bd8b0ff1f to your computer and use it in GitHub Desktop.
make-polaroid: create a polaroid-stylish n x m poster
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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