Page 1 of 1

Bad results when saving an anim to GIF

Posted: Fri Mar 10, 2017 2:36 pm
by jPV
I've been trying to save anims to gifs, but seem to get some garbage to the saved gif anims often. I tried to play with different options (dither, colors, optimize, transparency), but seems that I can't find anything which would make a difference. I'm starting to think that maybe gif saving is buggy somehow?

For example:

Code: Select all

LoadAnim(1,"Hollywood:MUIRoyale/Examples/Hollywood/Anim/Amy_Walks.anim")
DisplayAnimFrame(1,0,0,16)
SaveAnim(1,"ram:test.gif", #ANMFMT_GIF)
WaitLeftMouse
FreeAnim(1)
LoadAnim(1,"ram:test.gif")
DisplayAnimFrame(1,0,0,16)
WaitLeftMouse
Will result images like this...
Image after loading the original animation:
Image

And image after saving and reloading the new gif anim:
Image

In this example most of the frames look good, but then there are few in the middle with some leftovers and other glitches which don't belong to the image.

Same happens with SaveAnim and WriteAnimFrame.... and saving to for example APNG doesn't result similar garbage.

Re: Bad results when saving an anim to GIF

Posted: Sat Mar 11, 2017 2:33 pm
by airsoftsoftwair
Yes, clearly a bug. This bug was introduced in Hollywood 6.0 when I implemented the following fix:

Code: Select all

- Fix: Exact precision for color quantization on images that use colors that can be represented in 8bit or
  less, for example when using the #IMGFMT_GIF saver
It's fixed now. Thanks for reporting!