I want save canvas as png photo.
But the background is always black.
fDst, err := os.Create("out2.png")
if err != nil {
log.Fatal(err)
}
defer fDst.Close()
err = png.Encode(fDst, cv.GetImageData(0, 0, cv.Width(), cv.Height()))
if err != nil {
log.Fatal(err)
}
wnd.Close()
I want save canvas as png photo.
But the background is always black.