title: P5.js - Is there a way to cut out an image area?
body: <p>Is there a way to "cut out" a piece of image and use it with the P5.js library? </p>
  
  <p><strong>Example:</strong> Lets say I have a image of the size 100x100 but need to get a 10x10 pixel cutout that starts at pixel 50,50 </p>
  
  <p><a href="https://i.stack.imgur.com/pQP7U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pQP7U.png" alt="10x10px cutout from an 100x100px image from 50,50px"></a></p>
  
  <p>I want to take the resulting 10x10 image and place it anywhere with <strong>image(result, X, Y, 10, 10)</strong>.</p>
  
  <p><strong>Note:</strong>
  The only thing I could find online similar to this was using <strong>mask()</strong> but the result is not what I need.</p>