MCPcopy Create free account
hub / github.com/fogleman/primitive / SavePNG

Function SavePNG

primitive/util.go:49–56  ·  view source on GitHub ↗
(path string, im image.Image)

Source from the content-addressed store, hash-verified

47}
48
49func SavePNG(path string, im image.Image) error {
50 file, err := os.Create(path)
51 if err != nil {
52 return err
53 }
54 defer file.Close()
55 return png.Encode(file, im)
56}
57
58func SaveJPG(path string, im image.Image, quality int) error {
59 file, err := os.Create(path)

Callers 1

SaveGIFImageMagickFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…