Last active
December 22, 2018 16:31
-
-
Save Lutzifer/0f396cccf8c5527d5ca8e3b211fa2944 to your computer and use it in GitHub Desktop.
Make a full page image by tiling and shifting a smaller image
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
# input, output, width, height, format | |
convert_tile () { | |
hh2=`/usr/local/bin/convert $1 -format "%[fx:h/2]" info:` | |
/usr/local/bin/convert $1 \( -clone 0 -roll +0+${hh2} \) +append -write mpr:cell +delete -size ${4}x${3} tile:mpr:cell $2_$5.png | |
} | |
/usr/local/bin/convert $1 -bordercolor transparent -border 15%x15% -alpha remove $1_border.png | |
convert_tile $1_border.png $1_paper 4455 3150 "A4" | |
open $1_paper_A4.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment