I have a horizontal image and i want to create a vertical copy of it for a specific resolution, filling the empty space around it with black. Can this be done with imagemagick and how?
Convert horizontal picture to vertical using imagemagick, filling empty space around with black
imagemagick
You could use convert with -extent (and specify background & gravity). Example:input file orca.jpg (lanscape, 300x225)If you want to create a portrait image 400x600 preserving the original image size:convert orca.jpg -background black -gravity center -extent 400x600 output.jpgproduces:Sure, you can also resize the original image to fit a smaller canvas:convert orca.jpg -resize 200 -background black -gravity center -extent 220x400 output.jpg