Function
uniformRGBA
(r image.Rectangle, c color.Color)
Source from the content-addressed store, hash-verified
| 180 | } |
| 181 | |
| 182 | func 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 | |
| 188 | func AverageImageColor(im image.Image) color.NRGBA { |
| 189 | rgba := imageToRGBA(im) |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…