Created
September 12, 2016 06:07
-
-
Save awstanley/6773ecf47bf1b7e24a7c19770eca9dc0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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