Last active
April 14, 2024 01:52
-
-
Save AkiyukiOkayasu/1373ebab29965c1312d8cbc11317b4ca to your computer and use it in GitHub Desktop.
ImageMagickで画像(JPG, PNG)を1:1にリサイズ、余白追加
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
# 余白を短辺にのみ設ける場合 | |
magick mogrify -filter Lanczos -distort Resize 1280x1280 -extent 1280x1280 -gravity center -background white -path converted *.jpg *.png | |
# 上下左右に少なくとも30pxの余白を設ける場合 | |
magick mogrify -filter Lanczos -distort Resize 1000x1000 -extent 1060x1060 -gravity center -background white -path converted *.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment