The imagetool however should be updated to not paint the background color in transparent pixels in animated GIFs when they are painting on top of an opaque pixel. Basically we should replace transparent pixels in the first frame with the --background color, and after that we should probably skip the painting of transparent pixels.
The NETSCAPE extension (aka "animated GIFs") to the GIF format carries some hints like DO NOT DISPOSE that govern the semantics of whether transparent pixels should yield the previous frame content or revert to a keyframe (like the first frame) or actually be transparent in the output. This needs to be investigated and support implemented.
After merging https://github.com/rlepigre/ocaml-imagelib/pull/43 we now have better support for transparency in the GIF format.
The
imagetool
however should be updated to not paint the background color in transparent pixels in animated GIFs when they are painting on top of an opaque pixel. Basically we should replace transparent pixels in the first frame with the--background
color, and after that we should probably skip the painting of transparent pixels.The
NETSCAPE
extension (aka "animated GIFs") to the GIF format carries some hints likeDO NOT DISPOSE
that govern the semantics of whether transparent pixels should yield the previous frame content or revert to a keyframe (like the first frame) or actually be transparent in the output. This needs to be investigated and support implemented.