Fork me on GitHub

Ranked awesome lists, all in one place

This list is a copy of davisonio/awesome-gif with ranks


Awesome GIF :sunglasses: ★73813

A curated list of awesome GIF resources

Contents · Use · Authors · License & Credits

This is a list of tools, scripts, libraries, examples & other resources related to the Graphics Interchange Format (GIF) image format.

Contents

General Tools

Utilities

Libraries

ActionScript

C++

C# - [dot-screencap ★18](https://github.com/Speiser/dot-screencap) - A simple libary to record your screen and save it as animated GIF - [WpfAnimatedGif ★14](https://github.com/thomaslevesque/WpfAnimatedGif) - A simple library to display animated GIF images in WPF - [XamlAnimatedGif ★15](https://github.com/thomaslevesque/XamlAnimatedGif) - A simple library to display animated GIF images in XAML apps (WPF, WinRT, Windows Phone) #### Haxe - [Gif ★27](https://github.com/snowkit/gif) - Haxe GIF encoder #### Java - [Android-gif-drawable ★5589](https://github.com/koral--/android-gif-drawable) - Views and Drawable for displaying animated GIFs on Android - [gifanimateddrawable ★220 ⏳3Y](https://github.com/Hipmob/gifanimateddrawable) - Use an animated GIF as an Android Drawable - [GifView ★78 ⏳4Y](https://github.com/RoiSoleil/GifView) - android library to deal with GIF - [Gif Movie View ★451 ⏳1Y](https://github.com/sbakhtiarov/gif-movie-view) - Android View widget for displaying GIF animations - [GifImageView ★925](https://github.com/felipecsl/GifImageView) - Android ImageView that handles animated GIF images - [Gif-animation ★108](https://github.com/extrapixel/gif-animation) - Processing library to play and export GIF - [Android-gif-encoder ★214 ⏳5Y](https://github.com/nbadal/android-gif-encoder) - animated GIF encoder for Android - [GIFDroid ★92 ⏳2Y](https://github.com/quackware/GIFDroid) - Android video to GIF converter - [Android-GifStitch ★39 ⏳5Y](https://github.com/CaptPhunkosis/Android-GifStitch) - create and share animated GIFs #### JavaScript - [Gif.js ★2398](https://github.com/jnordberg/gif.js) - Javascript - create GIF from the DOM - [Omggif ★385](https://github.com/deanm/omggif) - Javascript - GIF 89a encoder and decoder - [Animated_GIF ★158 ⏳1Y](https://github.com/sole/Animated_GIF) - Javascript library for creating animated GIFs - [Gifffer ★588](https://github.com/krasimir/gifffer) JavaScript library that prevents the autoplaying of the animated GIFs - [Gifplayer ★357](https://github.com/rubentd/gifplayer) - jquery plugin to play and stop animated GIFs - [Jsgif ★399 ⏳1Y](https://github.com/shachaf/jsgif) - JavaScript GIF parser and player - [node-gify ★222 ⏳1Y](https://github.com/tj/node-gify) - Javascript convert videos to GIFs using ffmpeg and gifsicle - [Gifencoder ★214](https://github.com/eugeneware/gifencoder) - Server side animated GIF generation for node.js - [Gif-video ★57 ⏳3Y](https://github.com/hughsk/gif-video) - Javascript Convert a GIF image into an HTML5-ready video - [Gif-player ★61 ⏳3Y](https://github.com/apankrat/gif-player) - On-demand GIF loader/player in Javascript - [GifgifLab-face ★6 ⏳2Y](https://github.com/Viral-MediaLab/gifgifLab-face) - Facial-emotion detectors - [node-youtube ★134 ⏳1Y](https://github.com/javascipt/node-youtube) - Youtube to snapshots and GIFs. #### PHP - [GifCreator ★243](https://github.com/Sybio/GifCreator) - PHP class that creates animated GIF from multiple images - [Spacer.gif ★16 ⏳1Y](https://github.com/msng/spacer.gif) - PHP script offering spacer.gif 1x1 - [GifFrameExtractor ★101 ⏳1Y](https://github.com/Sybio/GifFrameExtractor) - PHP class that separates all the frames of an animated GIF #### Objective-C - [AnimatedGIFImageSerialization ★1033](https://github.com/mattt/AnimatedGIFImageSerialization) - decodes an UIImage from Animated GIFs image data - [UIimage from GIF ★825 ⏳2Y](https://github.com/mayoff/uiimage-from-animated-gif) - UIImage category that loads animated GIFs - [GIFRefreshControl ★301 ⏳3Y](https://github.com/cyndibaby905/GIFRefreshControl) - "Twitter music" and "Yahoo! Weather" like pull-to-refresh control - [UIImageView-PlayGIF ★422](https://github.com/yfme/UIImageView-PlayGIF) - UIImageView category/subclass for playing GIF - [FLAnimatedImage ★6286](https://github.com/Flipboard/FLAnimatedImage) - Gif engine for iOS by FlipBoard - [Animated-GIF-iPhone ★133 ⏳2Y](https://github.com/arturogutierrez/Animated-GIF-iPhone) - Support for Animated GIF on iOS - [UzysAnimatedGifPullToRefresh ★1409 ⏳1Y](https://github.com/uzysjung/UzysAnimatedGifPullToRefresh) - PullToRefresh using animated GIF to any scrollView - [SvGifView ★84 ⏳3Y](https://github.com/smileEvday/SvGifView) - iOS load and display GIF - [GifHUD ★160 ⏳3Y](https://github.com/cemolcay/GiFHUD) - iOS progress hud for displaying only animated GIF images - [Video-Background GIF ★151 ⏳1Y](https://github.com/ElvinJin/Video-Background-GIF) - iOS Video Background GIF - [AnimatedGifExample ★40 ⏳7Y](https://github.com/kasatani/AnimatedGifExample) - iOS animated and transparent GIFs - [OLImageView ★877 ⏳2Y](https://github.com/dtorres/OLImageView) - iOS OLImage and OLImageView support for animated GIFs #### Swift - [Gifu ★1885](https://github.com/kaishin/gifu) - animated GIF support for iOS in Swift - [SwiftGif ★752](https://github.com/bahlo/SwiftGif) - UIImage extension with GIF support ### GUI - [Glyph](http://www.glyph.video/) - tool for generating seamlessly looping GIFs and cinemagraphs from videos - [Qgifer](https://sourceforge.net/projects/qgifer/) - [GIFs ★595 ⏳1Y](https://github.com/orta/GIFs) - Mac App for finding GIFs - [VineGifR ★87 ⏳5Y](https://github.com/esten/VineGifR) - Mac app to turn Vine videos into GIFs - [GifPro ★42 ⏳6Y](https://github.com/unixpickle/GifPro) - GIF encoder for Mac - [Gif Maker](https://gifmaker.movielala.com) - High quailty GIF maker with filters for Mac - [AnimatedGif ★42](https://github.com/Waitsnake/AnimatedGif) - Mac Screensaver for playing GIFs ### Hosting - [Gfycat](https://gfycat.com) - Maximum GIF/video length: 15 seconds. Maximum file upload is 300Mb - [Imgur](https://imgur.com) - Maximum file upload is 50MB ### Online Tools - [Vid2gif](http://imgur.com/vidgif) - Video to GIF by imgur - [EzGif](https://ezgif.com/) - Online GIF maker and image editor - [Giflr](https://giflr.com/) - A web app for making or remixing animated GIFs - [Gif.gf](http://www.gif.gf/labs/face) - Provide a matching GIF for your face ### Community - [Giphy.com](https://giphy.com) - [Gifme.io](http://gifme.io) - [9gag.com/gif](https://9gag.com/gif) - [Reactionsgifs](http://www.reactiongifs.com/) - [Educational Gifs](https://www.reddit.com/r/educationalgifs/) ### Niche - [Starwars-dot-gif ★475](https://github.com/LindseyB/starwars-dot-gif) - Python script to generate GIFs from star wars ### Scripts #### Frames to GIF FFmpeg ```bash ffmpeg -f image2 -i image%d.jpg animated.gif ``` Imagemagick ```bash convert -delay 20 -loop 0 frames*.png animated.gif ``` Bash script (```frames2gif.sh```) for GraphicsMagick, ImageMagick, FFmpeg ```bash #!/bin/bash if [ $# -ne 5 ]; then echo "please provide the moviename and directory where to store the frames" echo "./frames2gif.sh [directory] [movie.mp4] [filename.gif] [gm|im|ffmpeg] [png|jpg]" exit 1 fi if [ "png" == "$5" ]; then suffix="png" else suffix="jpg" fi CONVERT=$(which convert) GM=$(which gm) FFMPEG=$(which ffmpeg) FFPROBE=$(which ffprobe) FPS=$($FFPROBE -show_streams -select_streams v -i "$2" 2>/dev/null | grep "r_frame_rate" | cut -d'=' -f2 | cut -d'/' -f1) echo "FPS: ${FPS}" if [ "im" == "$4" ]; then # use imagemagick FPS=$(echo "1 / ${FPS} * 100" |bc -l) $CONVERT "$1/*.${suffix}" -delay ${FPS} -loop 0 "$3" elif [ "gm" == "$4" ]; then # use graphicsmagick FPS=$(echo "1 / ${FPS} * 100" |bc -l) $GM convert "$1/*.${suffix}" -delay ${FPS} -loop 0 "$3" else # use crappy gif-algorithm from ffmpeg $FFMPEG -f image2 -framerate ${FPS} -i "$1/%08d.${suffix}" "$3" fi ``` From [DeepDreamVideo ★1849](https://github.com/graphific/DeepDreamVideo), [source](https://github.com/graphific/DeepDreamVideo/blob/master/frames2gif.sh) #### GIF to frames ```bash ffmpeg -i video.mpg image%d.jpg ``` ```bash convert -coalesce animated.gif image%05d.png ``` #### High quality GIF with ffmpeg / based on this [article](http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html) - Generate a palette : ```bash #!/bin/sh start_time=30 duration=3 ffmpeg -y -ss $start_time -t $duration -i input.avi \ -vf fps=10,scale=320:-1:flags=lanczos,palettegen palette.png ``` - Output the GIF using the palette : ```bash #!/bin/sh start_time=30 duration=3 ffmpeg -ss $start_time -t $duration -i input.avi -i palette.png -filter_complex \ "fps=10,scale=320:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif ``` [article](http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html) #### Optimize GIF ``` convert -layers Optimize output.gif output_optimized.gif ``` #### Lossy GIF Compressor ```bash ./gifsicle -O3 --lossy=80 -o lossy-compressed.gif input.gif ``` [Lossy Gif](https://kornel.ski/lossygif) #### Making GIF from video ```python from moviepy.editor import * clip = (VideoFileClip("input.avi") .subclip((4,00.00),(5,00.00)) .resize(0.3)) clip.write_gif("output.gif") ``` [article](http://zulko.github.io/blog/2014/01/23/making-animated-gifs-from-video-files-with-python/#converting-a-video-excerpt-into-a-gif) #### Cinemagraphs Freezing a region ```python from moviepy.editor import * clip = (VideoFileClip("input.avi") .subclip((4,00.00),(5,00.00)) .resize(0.3) .fx(vfx.freeze_region, outside_region=(170, 230, 380, 320))) clip.write_gif("output.gif", fps=15) ``` [article](http://zulko.github.io/blog/2014/01/23/making-animated-gifs-from-video-files-with-python/#freezing-a-region) ```bash ffmpeg \ -ss ${starttime} -t ${duration} -i ${vidfile} `# body of loop` \ -ss TODO ${starttime} MINUS ${duration} -t ${fadetime} -i ${vidfile} `# lead-in for crossfade` \ -loop 1 -i ${stillfile} `# masked still image` \ -filter_complex " [0:v]setpts=PTS-STARTPTS[vid]; `# speed adjustment - not needed here, so noop` color=white,scale=3840x2160,fade=in:st=0:d=${fadetime}[alpha]; `# crossfade alpha, double length ahead of speed change` [1:v][alpha]alphamerge[am]; `# apply alpha to lead-in` [am]setpts=PTS+(${duration}-${fadetime})/TB[layer2]; `# speed adjustment and offset for lead-in` [vid][layer2]overlay[oo]; `# overlay for crossfade` [oo][2:v]overlay=shortest=1[out1]; `# overlay still image` [out1]crop=w=${cropfactor}*iw:h=${cropfactor}*ih:y=${yoffset}*ih,scale=${outputwidth}:-1, `# crop and scale` eq=gamma=${gamma}:contrast=${contrast}:saturation=${saturation},unsharp `# final adjustments` " -an output.mp4 ``` by [Roger Barnes](https://bitbucket.org/snippets/rbarnesatl/6jRB) #### Perfect Loop ```python import moviepy.editor as mp from moviepy.video.tools.cuts import FramesMatches clip = mp.VideoFileClip("input.avi").resize(0.3) scenes = FramesMatches.from_clip(clip, 10, 3) selected_scenes = scenes.select_scenes(2, 1, 4, 0.5) selected_scenes.write_gifs(clip.resize(width=450), "./outputs_directory") ``` [article](http://zulko.github.io/blog/2015/02/01/extracting-perfectly-looping-gifs-from-videos-with-python-and-moviepy/) #### Youtube video to GIF - Download it via youtube-dl and then convert it. ``` youtube-dl https://www.youtube.com/watch?v=V2XpsaLqXc8 ``` [Youtube-dl](https://rg3.github.io/youtube-dl/) - with [vid2gif](http://imgur.com/vidgif) online - [source ★1 ⏳4Y](https://github.com/jimgur/gif) #### Grabbing each frame of an HTML5 Canvas using [PhantomJS](http://phantomjs.org/) Example with this [canvas](http://www.effectgames.com/demos/canvascycle/?sound=0). ```javascript var webPage = require('webpage'); var fs = require('fs'); var page = webPage.create(); var NB_FRAME = 100; var current = 0; page.open('http://www.effectgames.com/demos/canvascycle/?sound=0', function(status) { if (status === "success") { var current = 0; var grabber = setInterval(function () { var frame = page.evaluate(function() { return document.getElementById('mycanvas').toDataURL("image/png").split(",")[1]; }); fs.write("./frame-" + current + ".png",atob(frame), 'wb'); if (++current === NB_FRAME) { window.clearInterval(grabber); phantom.exit(0); } }, 1000); } }); ``` or use [ccapture.js ★1027](https://github.com/spite/ccapture.js). ### Miscellaneous - [Why is the GIF I created so slow?](https://superuser.com/questions/569924/why-is-the-gif-i-created-so-slow/569967) - Using ImageMagick to solve problems concerning GIF speed. ## Use The best ways to use this list are: - by browing the [contents](#contents) - by using command + F to search the contents ## Authors **[Craig Davison](https://davison.io)** [![](https://img.shields.io/github/followers/davisonio.svg?style=social&label=Follow%20davisonio)](https://github.com/davisonio) [![](https://img.shields.io/twitter/follow/davisonio.svg?style=social)](https://twitter.com/davisonio) With many thanks to the [contributors](https://github.com/davisonio/awesome-gif/graphs/contributors). :clap: **Contributions are welcome!** Check out the [Contributing Guidelines](https://github.com/davisonio/awesome-gif/blob/master/CONTRIBUTING.md). :raised_hands: ## License & Credits Unless otherwise stated: - Copyright © 2017+ [Craig Davison](https://davison.io). Released under the [CC0 1.0 License](https://creativecommons.org/publicdomain/zero/1.0/). Based on a [recovered list](https://github.com/sindresorhus/awesome/issues/872): - Copyright © 2015-2016 [Ismail Baaj](http://ismailbaaj.fr). ---

This list is a copy of davisonio/awesome-gif with ranks