1 | initial version |
There is a version of the copyto function that takes a mask image. A mask image is the same size as the image copying from. Pixels that are 255 in the mask get copied to the new image, pixels that are 0 in the mask do not get copied.