Page 1 of 1

[RESOLVED] possible bug animation -set delay, swap or optimize IM6.9.0.4 Q16

Posted: 2015-02-05T19:16:08-07:00
by fmw42
I have this gif (animation)

http://www.fmwconcepts.com/misc_test/an ... tmp1_6.gif

which seems correct in that each frame is 240x160
identify tmp1_6.gif
tmp1_6.gif[0] GIF 240x160 240x160+0+0 8-bit sRGB 256c 490KB 0.000u 0:00.000
tmp1_6.gif[1] GIF 240x160 240x160+0+0 8-bit sRGB 256c 490KB 0.000u 0:00.000
tmp1_6.gif[2] GIF 240x160 240x160+0+0 8-bit sRGB 256c 490KB 0.000u 0:00.000
tmp1_6.gif[3] GIF 240x160 240x160+0+0 8-bit sRGB 256c 490KB 0.000u 0:00.000
tmp1_6.gif[4] GIF 240x160 240x160+0+0 8-bit sRGB 256c 490KB 0.000u 0:00.000
tmp1_6.gif[5] GIF 240x160 240x160+0+0 8-bit sRGB 256c 490KB 0.000u 0:00.000
tmp1_6.gif[6] GIF 240x160 240x160+0+0 8-bit sRGB 256c 490KB 0.000u 0:00.000
tmp1_6.gif[7] GIF 240x160 240x160+0+0 8-bit sRGB 256c 490KB 0.000u 0:00.000
tmp1_6.gif[8] GIF 240x160 240x160+0+0 8-bit sRGB 256c 490KB 0.000u 0:00.000
tmp1_6.gif[9] GIF 240x160 240x160+0+0 8-bit sRGB 256c 490KB 0.000u 0:00.000
tmp1_6.gif[10] GIF 240x160 240x160+0+0 8-bit sRGB 256c 490KB 0.000u 0:00.000
tmp1_6.gif[11] GIF 240x160 240x160+0+0 8-bit sRGB 256c 490KB 0.000u 0:00.000
tmp1_6.gif[12] GIF 240x160 240x160+0+0 8-bit sRGB 256c 490KB 0.000u 0:00.000
tmp1_6.gif[13] GIF 240x160 240x160+0+0 8-bit sRGB 256c 490KB 0.000u 0:00.000
tmp1_6.gif[14] GIF 240x160 240x160+0+0 8-bit sRGB 256c 490KB 0.000u 0:00.000
tmp1_6.gif[15] GIF 240x160 240x160+0+0 8-bit sRGB 256c 490KB 0.000u 0:00.000
tmp1_6.gif[16] GIF 240x160 240x160+0+0 8-bit sRGB 256c 490KB 0.000u 0:00.000
tmp1_6.gif[17] GIF 240x160 240x160+0+0 8-bit sRGB 256c 490KB 0.000u 0:00.000


If I then do

Code: Select all

convert tmp1_6.gif -coalesce \
\( -clone 0 -set delay 50 \) -swap 0,-1 +delete \
-quiet -layers Optimize tmp1_6_swap1.gif
The resulting gif shows two frames [1-2] as having size 1x1, which is not correct

http://www.fmwconcepts.com/misc_test/an ... _swap1.gif

identify tmp1_6_swap1.gif
tmp1_6_swap1.gif[0] GIF 240x160 240x160+0+0 8-bit sRGB 256c 448KB 0.000u 0:00.000
tmp1_6_swap1.gif[1] GIF 1x1 240x160+0+0 8-bit sRGB 256c 448KB 0.000u 0:00.000
tmp1_6_swap1.gif[2] GIF 1x1 240x160+0+0 8-bit sRGB 256c 448KB 0.000u 0:00.000
tmp1_6_swap1.gif[3] GIF 240x160 240x160+0+0 8-bit sRGB 256c 448KB 0.000u 0:00.000
tmp1_6_swap1.gif[4] GIF 240x160 240x160+0+0 8-bit sRGB 256c 448KB 0.000u 0:00.000
tmp1_6_swap1.gif[5] GIF 240x160 240x160+0+0 8-bit sRGB 256c 448KB 0.000u 0:00.000
tmp1_6_swap1.gif[6] GIF 240x160 240x160+0+0 8-bit sRGB 256c 448KB 0.000u 0:00.000
tmp1_6_swap1.gif[7] GIF 240x160 240x160+0+0 8-bit sRGB 256c 448KB 0.000u 0:00.000
tmp1_6_swap1.gif[8] GIF 240x160 240x160+0+0 8-bit sRGB 256c 448KB 0.000u 0:00.000
tmp1_6_swap1.gif[9] GIF 240x160 240x160+0+0 8-bit sRGB 256c 448KB 0.000u 0:00.000
tmp1_6_swap1.gif[10] GIF 240x160 240x160+0+0 8-bit sRGB 256c 448KB 0.000u 0:00.000
tmp1_6_swap1.gif[11] GIF 240x160 240x160+0+0 8-bit sRGB 256c 448KB 0.000u 0:00.000
tmp1_6_swap1.gif[12] GIF 240x160 240x160+0+0 8-bit sRGB 256c 448KB 0.000u 0:00.000
tmp1_6_swap1.gif[13] GIF 240x160 240x160+0+0 8-bit sRGB 256c 448KB 0.000u 0:00.000
tmp1_6_swap1.gif[14] GIF 240x160 240x160+0+0 8-bit sRGB 256c 448KB 0.000u 0:00.000
tmp1_6_swap1.gif[15] GIF 240x160 240x160+0+0 8-bit sRGB 256c 448KB 0.000u 0:00.000
tmp1_6_swap1.gif[16] GIF 240x160 240x160+0+0 8-bit sRGB 256c 448KB 0.000u 0:00.000
tmp1_6_swap1.gif[17] GIF 240x160 240x160+0+0 8-bit sRGB 256c 448KB 0.000u 0:00.000


P.S. Same in IM 7

Re: possible bug animation -set delay, swap or optimize IM6.9.0.4 Q16

Posted: 2015-02-05T20:00:57-07:00
by snibgo
We get the same result from a simple "-layers optimize":

Code: Select all

f:\web\im>%IM%convert tmp1_6.gif -layers optimize r.gif

f:\web\im>%IM%identify r.gif
r.gif[0] GIF 240x160 240x160+0+0 8-bit sRGB 256c 451KB 0.000u 0:00.001
r.gif[1] GIF 1x1 240x160+0+0 8-bit sRGB 256c 451KB 0.000u 0:00.003
r.gif[2] GIF 1x1 240x160+0+0 8-bit sRGB 256c 451KB 0.000u 0:00.006
r.gif[3] GIF 240x160 240x160+0+0 8-bit sRGB 256c 451KB 0.000u 0:00.010
r.gif[4] GIF 240x160 240x160+0+0 8-bit sRGB 256c 451KB 0.000u 0:00.013
r.gif[5] GIF 240x160 240x160+0+0 8-bit sRGB 256c 451KB 0.000u 0:00.017
r.gif[6] GIF 240x160 240x160+0+0 8-bit sRGB 256c 451KB 0.016u 0:00.020
r.gif[7] GIF 240x160 240x160+0+0 8-bit sRGB 256c 451KB 0.016u 0:00.024
r.gif[8] GIF 240x160 240x160+0+0 8-bit sRGB 256c 451KB 0.016u 0:00.027
r.gif[9] GIF 240x160 240x160+0+0 8-bit sRGB 256c 451KB 0.016u 0:00.031
r.gif[10] GIF 240x160 240x160+0+0 8-bit sRGB 256c 451KB 0.016u 0:00.034
r.gif[11] GIF 240x160 240x160+0+0 8-bit sRGB 256c 451KB 0.016u 0:00.038
r.gif[12] GIF 240x160 240x160+0+0 8-bit sRGB 256c 451KB 0.016u 0:00.041
r.gif[13] GIF 240x160 240x160+0+0 8-bit sRGB 256c 451KB 0.016u 0:00.045
r.gif[14] GIF 240x160 240x160+0+0 8-bit sRGB 256c 451KB 0.016u 0:00.048
r.gif[15] GIF 240x160 240x160+0+0 8-bit sRGB 256c 451KB 0.016u 0:00.052
r.gif[16] GIF 240x160 240x160+0+0 8-bit sRGB 256c 451KB 0.016u 0:00.057
r.gif[17] GIF 240x160 240x160+0+0 8-bit sRGB 256c 451KB 0.016u 0:00.062
The small size of the deltas suggests that frames 1 and 2 are identical to 0. Sure enough:

Code: Select all

f:\web\im>%IM%compare -metric AE tmp1_6.gif[0] tmp1_6.gif[1] NULL:
0
f:\web\im>%IM%compare -metric AE tmp1_6.gif[0] tmp1_6.gif[2] NULL:
0
f:\web\im>%IM%compare -metric AE tmp1_6.gif[0] tmp1_6.gif[3] NULL:
26370
So I don't think there is a problem.

Re: possible bug animation -set delay, swap or optimize IM6.9.0.4 Q16

Posted: 2015-02-05T20:58:21-07:00
by fmw42
OK. Thanks. I guess the argument change was not enough to make a difference for those two frames and the later layers optimize then recognized it.

Thanks, snibgo, for the analysis. I am home with a bad cold and not thinking well.

I will mark this resolved.