Skip to content

zenoda/imgview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

imgview

1. Installation Instructions

Go

Go 1.8 or newer is required.

GTK, GLib, Cairo

Due to imgview's dependency on gotk3, according to the installation instructions for gotk3, it currently requires GTK 3.6-3.22, GLib 2.36-2.40, and Cairo 1.10 or 1.12:

imgview

go get -u github.com/zenoda/imgview

2. Example Usage

package main
import (
    "github.com/zenoda/imgview"
    "image/jpeg"
    "os"
)

func main() {
    f, err := os.Open("pic.jpg")
    if err != nil {
    panic(err)
    }
    defer f.Close()
    img, err := jpeg.Decode(f)
    if err != nil {
    panic(err)
    }
    imgview.Show(img)
}

imgview.png

About

A GUI library for image viewing

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages