Open
Description
I have noticed many examples from "fogleman/gg" save it output image file to "out.png".
That can be tricky!
I would like to suggest two additional lines, who it'll save the PNG with the same name of executable. Changing the extension only!
outPNG := strings.ReplaceAll(filepath.Base(os.Args[0]), filepath.Ext(os.Args[0]), ".png")
dc.SavePNG(outPNG)
I have the habit of build all the samples and test it one at the time.
But this litlte folks overwrite the old output file.
Metadata
Metadata
Assignees
Labels
No labels