Skip to main content

[pkg] image

image @ golang

Image Interface#

type Image interface {
ColorModel() color.Model
Bounds() Rectangle
At(x, y int) color.Color
}

範例#

// A Tour of Go: https://tour.golang.org/methods/24
func main() {
m := image.NewRGBA(image.Rect(0, 0, 100, 100))
fmt.Println(m.Bounds())
fmt.Println(m.At(0, 0).RGBA())
}
Last updated on