We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello! I want to copy an ellipse of pixels from an image or Capture event to my processing sketch. the copy() function only allows for rectangles and the get() function only copies a single pixel value. Is there a way to do this?
Look into using mask().
For a mask()-based example, see:
You would use ellipse() instead of triangle() -- or draw any mask shape you want, really.
I was hoping to actually copy the pixels from the image to the ellipse at location mouseX, mouseY and use it sort of as a paintbrush. This is a good start though, thank you so much!
In the linked example, change:
image(photo, 0, 0);
image(photo, mouseX, mouseY);
...paintbrush. Big, awkward paintbrush.
You may want to use imageMode(CENTER) in setup.
Yes! thank you jeremydouglass!