mono / libgdiplus

C-based implementation of the GDI+ API
http://www.mono-project.com/
MIT License
329 stars 171 forks source link

Animated GIFs don't render the frame correctly when only a portion is updated #705

Open jeffhandley opened 3 years ago

jeffhandley commented 3 years ago

When animating a GIF that has only a portion of the image update from one frame to the next, only the updated portion of the image is rendered on the frame, instead of overlaying the update over the previous image.

This was discovered on Ubuntu 20.04 using the following test image.

animated-timer-10fps-repeat-infinite

Here are some captured renderings of the GIF as it's animating. The captures were collected by using image.SelectActiveFrame and then calling image.Save, saving into Jpeg format. Notice that in addition to only portions of the image getting updated, there are also some frames with noise.

95_005619 96_005667 97_005712 98_005774 99_005820 100_005871 101_005933 102_005982 103_006061 104_006117 105_006169 106_006212 107_006259 108_006373 109_006418 110_006472 111_006520

The full/correct image is rendered again when frame 0 is selected after an animation loop. 422_020974