I have portrait and landscape JPEG images.
我有肖像和风景JPEG图像。
I want to make square thumbnails with white background from all of them. I need to keep the aspect ratio of all images and reduce the larger border to 200px.
我想制作带有白色背景的方形缩略图。我需要保持所有图像的纵横比,并将较大的边框缩小到200px。
I want to use ImageMagick (CLI) but I don't know how to do that. Any idea ?
我想使用ImageMagick(CLI),但我不知道该怎么做。任何的想法 ?
Here is the individual images :
这是个人图片:
1 个解决方案
#1
I think you need this:
我想你需要这个:
convert -background white -gravity center \
input.jpg -resize 200x200 -extent 200x200 result.jpg
#1
I think you need this:
我想你需要这个:
convert -background white -gravity center \
input.jpg -resize 200x200 -extent 200x200 result.jpg