I'm trying to animate a few images of different sizes and orientations.
Say 100x50, 50x100, 30x30
I'm looking for an easy way to have them animate nicely, with images centered and scaled.
Do I have to individually calculate the offset and resizes? or can I apply something like -gravity center.
as it is now, anything bigger than the first frame gets cut off, and non of the images are scaled or aligned.
Any ideas?
Centering / Scaling images in animation
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Centering / Scaling images in animation
what is your command line?
you probably need to use -page as per http://www.imagemagick.org/Usage/anim_basics/
but Anthony is the expert on this
Alternately, just -exent each image to the size of the largest before making the animation
convert image1 image2 image3 ... -background white -gravity center -extent WidthxHeight animation.gif
you probably need to use -page as per http://www.imagemagick.org/Usage/anim_basics/
but Anthony is the expert on this
Alternately, just -exent each image to the size of the largest before making the animation
convert image1 image2 image3 ... -background white -gravity center -extent WidthxHeight animation.gif
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Centering / Scaling images in animation
I would need to know exactly what you want, you are not clear in what your input and output will be!
Do you have individual images, or a pre-existing GIF animation.
Do you want to scale the images to best fit the size given, or crop them?
But essentially if you create the sequence of frames as what you want to see, then -layers optimize them, you will get an appropriate GIF animation. If the input is already a GIF animation 'coalesce' the animation first so as to remove any existing GIF animation optimizations that could cause problems with your image manipulation.
Do you have individual images, or a pre-existing GIF animation.
Do you want to scale the images to best fit the size given, or crop them?
But essentially if you create the sequence of frames as what you want to see, then -layers optimize them, you will get an appropriate GIF animation. If the input is already a GIF animation 'coalesce' the animation first so as to remove any existing GIF animation optimizations that could cause problems with your image manipulation.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Centering / Scaling images in animation
Ah, thanks, the -extent option was what I needed. gravity wasn't affecting anything otherwise.
thanks for all your help!
thanks for all your help!