Gif

Image Intrinsic Dimension

About

gif is an image format.

It is normally recommended to save drawings in the webp or png format rather than the GIF format. But for animation, as the animated versions of the PNG format, MNG and APNG, have limited support, GIF is the only real option for animation.

Characteristic

Management

Creating

Convert Video to Gif

  • Video to Gif: ffmpeg
#basic
ffmpeg -i video.avi video.gif -hide_banner
ffmpeg -i video_320x180.mp4 agif_320x180.gif -hide_banner

# reduce resolution
ffmpeg -i video_320x180.mp4 -vf scale=160:90 agif_160x90.gif -hide_banner

# reduce Frame per second to 10
ffmpeg -i video_320x180.mp4 -r 10 agif_r10_320x180.gif -hide_banner

Resize and Crop

Compression

Command line

Diff

gifdiff with giscle

Concat

Giffsicle

gifsicle --delay 50 -- loop=3 pic1.gif pic2.gif pic3.gif > animation.gif

Options:

  • --delay or -d: 50 = half second
  • --loopcount or --loop, read in loop N times
  • --optimize

Explode

gifsicle --explode anim.gif

Documentation / Reference





Discover More
Utah Teapot
Data Viz - (Chart|Graph) Persistence / Storage / Format

Raster image format: PNG is better than JPEG when saving chart by a long way because the PNG format is lossless. svg
Utah Teapot
Data Vizualisation - Animation

Animation is defined as a series of steps from one object state to another through transition. Animations in web browsers come in two forms: native (declarative ones), such as the element...
Data System Architecture
Image - Transparency / Opacity

Image that supports transparency: svg
Data System Architecture
What are the Image Formats?

This article is all image format that is given by the extension. Type Name Best For raster PNG logos, illustrations, icons Not for a detailed image like a photo as PNG file size would typically...



Share this page:
Follow us:
Task Runner