Any experts in using ImageMagick lurking?
I need to resize an image to fit into a 350x350 box. Which means I need to (a) scale the image so no dimension exceeds 350, then (b) centre the image in a 350x350 canvas.
Eg for a 700x600 image, (a) creates a 350x300 image which (b) then converts to 350x350 without distorting it (by adding "whitespace".
Ideally I want some control over what the canvas colour ("whitespace") will be, in particular transparent would be a good option, but white will do for now.
The first bit is easy: convert -resize 350x350 old.png new.png I've tried various ways to do step (b) without success. (A single command which does both would be best, but two separate commands would be a start!)