Skip to content

Instantly share code, notes, and snippets.

@awstanley
Created September 12, 2016 06:07
Show Gist options
  • Save awstanley/6773ecf47bf1b7e24a7c19770eca9dc0 to your computer and use it in GitHub Desktop.
Save awstanley/6773ecf47bf1b7e24a7c19770eca9dc0 to your computer and use it in GitHub Desktop.
package main
import (
_ "github.com/awstanley/go.sga"
"image"
"image/png"
"os"
)
func main() {
fp, _ := os.Open("map.rgb")
img, tp, err := image.Decode(fp)
if err != nil {
println(err.Error())
return
}
println("type", tp)
out, _ := os.Create("map.png")
png.Encode(out, img)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment