Animated gif sizing issues

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
rparker
Posts: 2
Joined: 2017-07-04T04:49:45-07:00
Authentication code: 1151

Animated gif sizing issues

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Animated gif sizing issues

Post by snibgo »

"-trim" often needs "+repage". Otherwise, it records canvas data, which is used when you make the gif.
snibgo's IM pages: im.snibgo.com
rparker
Posts: 2
Joined: 2017-07-04T04:49:45-07:00
Authentication code: 1151

Re: Animated gif sizing issues

Post by rparker »

Thanks, that solved it!
Post Reply