possible bug trimming animation in IM 7.0.6-0 Q16

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

possible bug trimming animation in IM 7.0.6-0 Q16

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

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

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

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

Post 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.
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

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

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

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