How to Reverse an Animated GIF

By  on  

Modifying visual media via code has always been a fascination of mine. Probably because I'm not a designer and I tend to stick to what I'm good at. One visual effect I love is seeing video reversed -- it provides a sometimes hilarious perspective on a given event.

Take this reversed water effect for example:

To reverse an animated GIF or video, you can use the ImageMagick library:

convert water-forward.gif -coalesce -reverse -quiet -layers OptimizePlus  -loop 0 water-reversed.gif

If you're interested in media engineering, check out my previous ImageMagick tutorials. These awesome media libraries are as close to an artist I will ever get!

Recent Features

  • By
    Being a Dev Dad

    I get asked loads of questions every day but I'm always surprised that they're rarely questions about code or even tech -- many of the questions I get are more about non-dev stuff like what my office is like, what software I use, and oftentimes...

  • By
    LightFace:  Facebook Lightbox for MooTools

    One of the web components I've always loved has been Facebook's modal dialog.  This "lightbox" isn't like others:  no dark overlay, no obnoxious animating to size, and it doesn't try to do "too much."  With Facebook's dialog in mind, I've created LightFace:  a Facebook lightbox...

Incredible Demos

Discussion

    Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!