You can do all that with ImageMagick.
You're question is not very specific, so here's a quick cheat sheet of command examples that may help you:
# resize image to width 25, keeping aspect ratio
convert -geometry 25x src/image1.png out/image1.png
# resize image to height 25, keeping aspect ratio
convert -geometry x25 src/image1.png out/image1.png
# concatenate images horizontally
convert +append src/image1.png src/image2.png out/image12horiz.png
# concatenate images vertically
convert -append src/image1.png src/image2.png out/image12vert.png
In addition, the montage
command is probably perfect to create the final image you are looking for (on a transparent bg with some padding, etc), but I don't remember the syntax.
Another useful command is identify
, to find the dimensions of images (along with other details).
After you install ImageMagick, you can see the list of commands in man ImageMagick
, and get further details on each command in the man pages. There are an awful lot of functions, but it should not be too difficult to figure out the rest on Google. (I do that all the time.)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…