Example #1
0
func (t *PixelGrid) Image() image.Image {
	return util.PixelDataToImage(t.Pix, t.w, t.h)
}
Example #2
0
func (this *Window) SaveScreenshot(name string) {
	gl.ReadBuffer(gl.FRONT)
	gl.ReadPixels(0, 0, this.width, this.height, gl.RGBA, this.pixelData)
	var im = util.PixelDataToImage(this.pixelData, this.width, this.height)
	util.WritePng(im, "res/screenshots/"+name)
}