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

Function uniformRGBA

primitive/util.go:182–186  ·  view source on GitHub ↗
(r image.Rectangle, c color.Color)

Source from the content-addressed store, hash-verified

180}
181
182func uniformRGBA(r image.Rectangle, c color.Color) *image.RGBA {
183 im := image.NewRGBA(r)
184 draw.Draw(im, im.Bounds(), &image.Uniform{c}, image.ZP, draw.Src)
185 return im
186}
187
188func AverageImageColor(im image.Image) color.NRGBA {
189 rgba := imageToRGBA(im)

Callers 1

NewModelFunction · 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…