title: How can I crop an image with Pygame?
body: <p>I am learning <code>pygame</code> and want a graphic for a button with the three states: normal, hover, and pressed. I have an image like this one ...</p>
  
  <p><img src="https://i.stack.imgur.com/ogtzS.png" alt="Three button states, stacked vertically"></p>
  
  <p>... and I want to get a new <code>Surface</code> using a portion of it.</p>
  
  <p>I'm loading the image with this code:</p>
  
  <pre><code> buttonStates = pygame.image.load(os.path.join('image','button.png'))
  </code></pre>
  
  <p>How can I make a new surface using just a portion of that graphic?</p>