img = loadImage("apples.jpg") image(img, 0, 0, width, height) copy(7, 22, 10, 10, 35, 25, 50, 50) stroke(255) noFill() # Rectangle shows area being copied rect(7, 22, 10, 10)
Copies a region of pixels from the display window to another area of the display window and copies a region of pixels from an image used as the srcImg parameter into the display window. If the source and destination regions aren't the same size, it will automatically resize the source pixels to fit the specified target region. No alpha information is used in the process, however if the source image has an alpha channel set, it will be copied as well.
As of release 0149, this function ignores imageMode().
copy(sx, sy, sw, sh, dx, dy, dw, dh) copy(src, sx, sy, sw, sh, dx, dy, dw, dh)
Updated on Mon Sep 21 15:53:24 2020.
If you see any errors or have comments, please let us know.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License