issue animating

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
raptura

issue animating

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: issue animating

Post 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.
raptura

Re: issue animating

Post 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?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: issue animating

Post 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
raptura

Re: issue animating

Post 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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: issue animating

Post 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"
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply