Last active
October 1, 2020 20:03
-
-
Save jsta/553692d56b94bcce310ba314b554fc74 to your computer and use it in GitHub Desktop.
Preview the title page of a pdf paper with a torn edge using imagemagick
This file contains hidden or 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
test.png: test.pdf | |
convert -density 300 $<[0] -crop 100x20% -background white -alpha remove -strip -quality 70 test.png | |
mv test-0.png test.png | |
rm test-*.png | |
convert test.png -alpha set -background black -fill white \ | |
\( +clone -colorize 100 -gravity south -chop 0x6 -splice 0x6 \ | |
-spread 20 -paint 8 +transparent white -blur 0x0.8 \) \ | |
-background none -compose dstin -composite torn.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
make test.png