Page 1 of 1

issue animating

Posted: 2010-05-18T11:08:39-07:00
by raptura
Yes, I am new to imagemagick and I am am sorry if this has been addressed before. I was trying to animate .ps files into an mpeg using the command
convert -delay 20 *.ps -rotate 90 -background white -flatten -resize 1080x1080 movie.mpg
but instead of making an animation, imagemagick just superimposes all the images together (ie I see all the images at once instead of them being played sequentially as a movie). Any help would be appreciated.

Re: issue animating

Posted: 2010-05-18T11:48:04-07:00
by fmw42
The flatten with *.ps overlays all the images together the way you have written it. I think you will need to write a loop to flatten each individual image over a white background, then add them to the animation one-by-one.

Re: issue animating

Posted: 2010-05-18T12:10:36-07:00
by raptura
okay, I see. I have this command in a script, so would I have to write that in the script, or is there some work around in imagemagick?

Re: issue animating

Posted: 2010-05-18T16:18:46-07:00
by fmw42
you would need to write a script to loop over each image.

You might get around it with

convert -delay 20 *.ps -rotate 90 -fill white -opaque none -resize 1080x1080 movie.mpg

Re: issue animating

Posted: 2010-05-18T16:50:39-07:00
by raptura
I thank you for the reply, but after doing some digging, the problem seemed to be that the alpha channel seems to set the background to black, and hence I thought I needed the -flatten -background white stuff. But this caused my problem of not animating. Later, I discovered that you can turn the alpha channel off.

In case any one is interested, here is the command I am currently using.
convert -delay 20 *.ps -rotate 90 -alpha Off -resize 1080x1080 movie.mpg

Re: issue animating

Posted: 2010-05-20T22:01:16-07:00
by anthony
When you have multiple images -flatten merges them to ONE IMAGE.

to prevent this use -border 0 instead.

See IM Examples, Animation Modification, Flattening.
http://www.imagemagick.org/Usage/anim_mods/#flatten

Technically what you want isn't 'Flattening' but transparent removal.
It is just that both flatten, border (and a number of other operators) also does "transparency removal".

I really have to go though IM examples and replace the term "flattening" with "transparency removal"