What's the easiest way for a Go program to display an image on Windows? I have this fragment based on a tutorial:
package main
import (
"image"
"image/color"
"image/draw"
)
func main() {
m := image.NewRGBA(image.Rect(0, 0, 640, 480))
blue := color.RGBA{0, 0, 255, 255}
draw.Draw(m, m.Bounds(), &image.Uniform{blue}, image.ZP, draw.Src)
}
But how to I display the object m? I'd like to pop up a window and display the image there, not write it out to a file first.
Aucun commentaire:
Enregistrer un commentaire