We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 60ee088 + a2a5fb6 commit b2e011eCopy full SHA for b2e011e
src/image/pixels.js
@@ -364,10 +364,10 @@ p5.prototype.filter = function(operation, value) {
364
* Getting the color of a single pixel with get(x, y) is easy, but not as fast
365
* as grabbing the data directly from pixels[]. The equivalent statement to
366
* get(x, y) using pixels[] with pixel density d is
367
- * <code>[pixels[(y*width*d+x)*d],
368
- * pixels[(y*width*d+x)*d+1],
369
- * pixels[(y*width*d+x)*d+2],
370
- * pixels[(y*width*d+x)*d+3]]</code>.
+ * <code>[pixels[(y*width*d+x*4)*d],
+ * pixels[(y*width*d+x*4)*d+1],
+ * pixels[(y*width*d+x*4)*d+2],
+ * pixels[(y*width*d+x*4)*d+3]]</code>.
371
* <br><br>
372
* See the reference for pixels[] for more information.
373
*
0 commit comments