Skip to content

Commit 2ce73e9

Browse files
committed
Modified documentation for global get() function
I've added a link to `p5.Image.get()` in the documentation for the global `get()` function, because some people (including me) might get confused and think that you cannot use get to extract a subimage from a `p5.Image`. The fact that you can call `copy(image, x, y, ...)` but you can't do the same with `get()` makes it a bit more confusing.
1 parent fdae910 commit 2ce73e9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/image/pixels.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,9 @@ p5.prototype.filter = function(operation, value) {
441441
* <br><br>
442442
* See the reference for <a href="#/p5/pixels">pixels[]</a> for more information.
443443
*
444+
* If you want to extract an array of colors or a subimage from an p5.Image object,
445+
* take a look at <a href="#/p5.Image/get">p5.Image.get</a>
446+
*
444447
* @method get
445448
* @param {Number} [x] x-coordinate of the pixel
446449
* @param {Number} [y] y-coordinate of the pixel

0 commit comments

Comments
 (0)