How do I crop an animated gif using ImageMagick?

convert input.gif -coalesce -repage 0x0 -crop WxH+X+Y +repage output.gif Animated gifs are often optimised to save space, but imagemagick doesn’t seem to consider this when applying the crop command and treats each frame individually. -coalesce rebuilds the full frames. Other commands will take into consideration the offset information supplied in the original gif, so you … Read more

Can you control GIF animation with Javascript?

You can use the libgif library. It allows you to start/stop the gif and control which frame the gif is on. <script type=”text/javascript” src=”https://stackoverflow.com/questions/2385203/./libgif.js”></script> <img src=”./example1_preview.gif” rel:animated_src=”./example1.gif” width=”360″ height=”360″ rel:auto_play=”1″ rel:rubbable=”1″ /> <script type=”text/javascript”> $$(‘img’).each(function (img_tag) { if (/.*\.gif/.test(img_tag.src)) { var rub = new SuperGif({ gif: img_tag } ); rub.load(function(){ console.log(‘oh hey, now the gif … Read more

Animated GIF in IE stopping

The accepted solution did not work for me. After some more research I came across this workaround, and it actually does work. Here is the gist of it: function showProgress() { var pb = document.getElementById(“progressBar”); pb.innerHTML = ‘<img src=”https://stackoverflow.com/questions/780560/./progress-bar.gif” width=”200″ height =”40″/>’; pb.style.display = ”; } and in your html: <input type=”submit” value=”Submit” onclick=”showProgress()” /> … Read more

How do I get an animated gif to work in WPF?

I couldn’t get the most popular answer to this question (above by Dario) to work properly. The result was weird, choppy animation with weird artifacts. Best solution I have found so far: https://github.com/XamlAnimatedGif/WpfAnimatedGif You can install it with NuGet PM> Install-Package WpfAnimatedGif and to use it, at a new namespace to the Window where you … Read more

Display Animated GIF

Android actually can decode and display animated GIFs, using android.graphics.Movie class. This is not too much documented, but is in SDK Reference. Moreover, it is used in Samples in ApiDemos in BitmapDecode example with some animated flag.

Programmatically generate video or animated GIF in Python?

I’d recommend not using images2gif from visvis because it has problems with PIL/Pillow and is not actively maintained (I should know, because I am the author). Instead, please use imageio, which was developed to solve this problem and more, and is intended to stay. Quick and dirty solution: import imageio images = [] for filename … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)