Skip to content

syohex/go-aalib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-aalib

AAlib binding for Go.

Sample Code

package main

import "github.com/syohex/go-aalib"
import "image"
import _ "image/png"
import "fmt"
import "os"

func main() {
	file, err := os.Open("sample.png")
	if err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
	defer file.Close()

	// Decode the image.
	goPng, _, err := image.Decode(file)
	if err != nil {
		fmt.Println(err)
		os.Exit(1)
	}

	handle, _ := aalib.Init(80, 60, aalib.AA_NORMAL_MASK)
	handle.PutImage(goPng)
	handle.Render(nil, 0, 0, 96, 96)
	aaStr := handle.Text()
	fmt.Println(aaStr)
}

About

AAlib binding for Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages