MCPcopy Index your code
hub / github.com/processing/p5.js / _getPixel

Method _getPixel

src/image/p5.Image.js:444–455  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

442 }
443
444 _getPixel(x, y) {
445 let imageData, index;
446 imageData = this.drawingContext.getImageData(x, y, 1, 1).data;
447 index = 0;
448 return [
449 imageData[index + 0],
450 imageData[index + 1],
451 imageData[index + 2],
452 imageData[index + 3]
453 ];
454 // return Renderer2D.prototype._getPixel.apply(this, args);
455 }
456
457 /**
458 * Sets the color of one or more pixels within an image.

Callers 1

getMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected