MCPcopy
hub / github.com/tensorflow/tfjs / getImageData

Method getImageData

tfjs-node/src/canvas_test.ts:21–27  ·  view source on GitHub ↗
(x: number, y: number, width: number, height: number)

Source from the content-addressed store, hash-verified

19
20class MockContext {
21 getImageData(x: number, y: number, width: number, height: number) {
22 const data = new Uint8ClampedArray(width * height * 4);
23 for (let i = 0; i < data.length; ++i) {
24 data[i] = i + 1;
25 }
26 return {data};
27 }
28}
29
30class MockCanvas {

Callers 5

loadMethod · 0.45
loadMethod · 0.45
readDataGPUToCPUMethod · 0.45
webgl_ops_test.tsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected