GitXplorerGitXplorer
s

go-aalib

public
11 stars
3 forks
0 issues

Commits

List of commits on branch master.

No commits found

There are no commits on branch master.

README

The README file for this repository.

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)
}