Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.08 KB

README.md

File metadata and controls

35 lines (24 loc) · 1.08 KB

gifview

Go Report Card Go Docs

Animated GIFs for TView-based TUIs (powered by pixelview)

demo

Usage

There are two ways to create a new GifView:

// From an existing gif.GIF object
gifImg := &gif.GIF{}
img, err := gifview.FromImage(gifImg)

// From a file path
gifPath := "images/dancing-baby.gif"
img, err := gifview.FromImagePath(gifPath)

Once you have one or more GifViews, they will animate whenever the application re-draws. You can force that to happen on a regular basis by using the Animate function.

app := tview.NewApplication()
go gifview.Animate(app)

Based on