Page 1 of 1

possible bug trimming animation in IM 7.0.6-0 Q16

Posted: 2017-06-17T10:47:42-07:00
by fmw42
I get a "hiccup" frame when trimming a gif animation in IM 7.0.6-0 Q16, but not IM 6.9.8-10 Q16 on Mac OS X Sierra.

Input Animation:
Image

IM 6 (correct):

Code: Select all

bgcolor=`convert oHBWq.gif[0] -format "%[pixel:u.p{0,0}]" info:`
convert -dispose previous -delay 10 -background "$bgcolor" oHBWq.gif -trim -layers TrimBounds -coalesce -layers optimize -loop 0 output6.gif
Image


IM 7 (error):

Code: Select all

bgcolor=`magick oHBWq.gif[0] -format "%[pixel:u.p{0,0}]" info:`
magick -dispose previous -delay 10 -background "$bgcolor" oHBWq.gif -trim -layers TrimBounds -coalesce -layers optimize -loop 0 output7.gif
Image

Re: possible bug trimming animation in IM 7.0.6-0 Q16

Posted: 2017-06-17T11:21:05-07:00
by fmw42
ASIDE: GeeMack has a very clever different approach that works in IM 7. See viewtopic.php?f=1&t=32161.

Nevertheless, I am still wondering why my solution does not work in IM 7, but works fine in IM 6

Re: possible bug trimming animation in IM 7.0.6-0 Q16

Posted: 2017-06-17T12:33:18-07:00
by fmw42
This may be a bug particular to the Mac (or perhaps Linux as well), since GeeMack has privately informed me that it works on his Windows system under IM 7.0.6.0.

Re: possible bug trimming animation in IM 7.0.6-0 Q16

Posted: 2017-06-17T12:44:00-07:00
by GeeMack
fmw42 wrote: 2017-06-17T12:33:18-07:00This may be a bug particular to the Mac (or perhaps Linux as well)...
Maybe. Your IM7 example file displays a glitch when viewed with IrfanView in on my Windows 10, so the problem seems to be in the file not your viewer.

When I try to reproduce your output with your same command at a Windows CMD prompt, using IM 7.0.6-0 Q16 x64 HDRI, and editing in the color instead of using a variable, I get a GIF that plays without that glitch.

I haven't noticed any obvious differences in file size or construction, but I haven't had a chance to dig very deep yet.

Re: possible bug trimming animation in IM 7.0.6-0 Q16

Posted: 2017-06-18T11:22:52-07:00
by magick
Here's the solution that appears to work with IMv7 (thanks Fred):

Code: Select all

magick -dispose previous -delay 10 -background "$bgcolor" oHBWq.gif -trim -layers TrimBounds -layers optimize -loop 0 output4.gif
EDIT: IM 7 needs the -coalesce remove from the same command that works in IM 6 --- Fred