MCPcopy
hub / github.com/fogleman/primitive / imageToRGBA

Function imageToRGBA

primitive/util.go:170–174  ·  view source on GitHub ↗
(src image.Image)

Source from the content-addressed store, hash-verified

168}
169
170func imageToRGBA(src image.Image) *image.RGBA {
171 dst := image.NewRGBA(src.Bounds())
172 draw.Draw(dst, dst.Rect, src, image.ZP, draw.Src)
173 return dst
174}
175
176func copyRGBA(src *image.RGBA) *image.RGBA {
177 dst := image.NewRGBA(src.Bounds())

Callers 3

NewModelFunction · 0.85
FramesMethod · 0.85
AverageImageColorFunction · 0.85

Calls 1

DrawMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…