![]() ![]() ![]() very slightly yellow-greenish white) rather than #ffffff (pure white). For example, for the animation shown above, the actual background color turned out to be #fdfffc (i.e. One detail worth noting is that, if the GIFsicle command doesn't seem to have any effect, you should check that the background color is really correct. Original animation by Wikimedia Commons user WillowW, used under the CC-By 3.0 license. The -O2 option is not strictly necessary, but it's likely to shrink the file size of the resulting animation by optimizing the frames to avoid needlessly re-drawing static parts of the animation.)įor a demostration, here's an animation of the human glyoxalase I (GLO1) enzyme from Wikimedia Commons (left), and the same animation with transparency added using the method shown above (right): This allows extra transparency to be added to the frames without letting the earlier frames show through the transparent parts. (The important options here are -U / -unoptimize and -disposal=previous, which together convert the animation into "flipbook mode", where each frame is fully erased before drawing the next one. Where anim.gif and anim_trans.gif are the source and destination file names, and #ffffff is the hex code of the color you want to make transparent (here, pure white). You can do this with GIFsicle, using the following options: gifsicle -U -disposal=previous -transparent=" #ffffff" -O2 anim.gif > anim_trans.gif ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |