Page 1 of 1

Animated gif sizing issues

Posted: 2017-07-04T04:57:08-07:00
by rparker
I'm hoping someone can help with this as it's starting to drive me crazy.

I produce a series of plots in postscript format.

I then convert them into PNG using this command

Code: Select all

mogrify -limit memory 2gb -limit map 32 -format png -page A1 -trim -density 300 filename.ps
This works perfectly and I'm left with a series of nice PNG files that have been trimmed to just the image contents (i.e. removing a lot of the blank space from the postscript page).

I then want to animate this sequence so do

Code: Select all

 convert -delay 20 *.png movie.gif
However, what this leaves me with is a gif file that is the wrong dimensions with a lot of vertical empty/transparent space.

Image

Any ideas what I'm doing wrong? I've tried the trim, crop and page settings but nothing seems to work.

Thanks

Edit: Version: ImageMagick 6.4.3 2016-08-05 Q16 OpenMP http://www.imagemagick.org

Re: Animated gif sizing issues

Posted: 2017-07-04T05:05:39-07:00
by snibgo
"-trim" often needs "+repage". Otherwise, it records canvas data, which is used when you make the gif.

Re: Animated gif sizing issues

Posted: 2017-07-04T06:37:24-07:00
by rparker
Thanks, that solved it!