Skip to content

Instantly share code, notes, and snippets.

@kana
Last active September 24, 2020 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kana/89553dd554a21b2699cc5adb00df10c4 to your computer and use it in GitHub Desktop.
Save kana/89553dd554a21b2699cc5adb00df10c4 to your computer and use it in GitHub Desktop.
convert m.png -gravity west -resize 3840x2160 -extent 10x ,left.png
convert m.png -gravity east -resize 3840x2160 -extent 40x ,right.png
convert \
\( ,left.png -gravity west -resize '2160x2160!' -blur 0x20 \) \
\( m.png -gravity center -resize '3840x2160' \) \
\( ,right.png -gravity east -resize '2160x2160!' -blur 0x20 \) \
+append ,base.png
convert ,base.png -gravity center -extent 3840x2160 -quality 90 ,t.jpg
convert m.png -gravity north -resize 2160x3840 -extent x20 ,top.png
convert m.png -gravity south -resize 2160x3840 -extent x40 ,bottom.png
convert \
\( ,top.png -gravity north -resize '2160x2160!' -blur 0x20 \) \
\( m.png -gravity north -resize '2160x3840' \) \
\( ,bottom.png -gravity south -resize '2160x2160!' -blur 0x20 \) \
-append ,base.png
convert ,base.png -gravity center -extent 2160x3840+0+420 -quality 90 ,t.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment