MCPcopy Index your code
hub / github.com/gonum/plot / newRGBAFrom

Function newRGBAFrom

cmpimg/cmpimg.go:190–197  ·  view source on GitHub ↗
(src image.Image)

Source from the content-addressed store, hash-verified

188}
189
190func newRGBAFrom(src image.Image) *image.RGBA {
191 var (
192 bnds = src.Bounds()
193 dst = image.NewRGBA(bnds)
194 )
195 draw.Draw(dst, bnds, src, image.Point{}, draw.Src)
196 return dst
197}
198
199// Diff calculates an intensity-scaled difference between images a and b
200// and places the result in dst, returning the intersection of a, b and

Callers 1

cmpImgFunction · 0.85

Calls 2

BoundsMethod · 0.80
DrawMethod · 0.65

Tested by

no test coverage detected