Part of what I'm currently trying to do has me resizing a number of images to be within 800x800px (but they all have different aspect ratios) and then center each image on a 1920x1080 canvas.
All of the functions I've looked at (-border, -extent, -frame, -splice) seem to be dependent on adding a constant number of pixels to the canvas but I want the same canvas size (1920x1080) no matter what image is being processed without altering that image in any other way.
Ideas?
How to enlarge canvas of various images to one size
-
coldkingnowhere
- Posts: 7
- Joined: 2011-11-01T13:36:39-07:00
- Authentication code: 8675308
- Contact:
Re: How to enlarge canvas of various images to one size
Try:
OR
Code: Select all
convert -size 1920x1080 xc:white image.jpg -gravity center -composite output.jpgCode: Select all
convert image.jpg -background white -gravity center -extent 1920x1080 output.jpg-
coldkingnowhere
- Posts: 7
- Joined: 2011-11-01T13:36:39-07:00
- Authentication code: 8675308
- Contact:
Re: How to enlarge canvas of various images to one size
That worked great! Thanks.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
- Contact:
Re: How to enlarge canvas of various images to one size
to include the resize... to fit in a 800x800 area in the center of the 1920x1080 canvas image...Bonzo wrote:Code: Select all
convert image.jpg -background white -gravity center -extent 1920x1080 output.jpg
Code: Select all
convert image.jpg -resize 800x800 -background white -gravity center -extent 1920x1080 output.jpgAnthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Who is online
Users browsing this forum: Amazon [Bot] and 35 guests