Skip to content

gifview is a tview that displays animated GIFs powered by pixelview

License

Notifications You must be signed in to change notification settings

stjohnjohnson/gifview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

gifview is a tview that displays animated GIFs powered by pixelview

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages