title: Crop a image in react native
body: <p>I'm referring to the image via <code>require</code> and I wanted to crop the icons from the sprite image.
  </p>
  
  <pre><code>const sprite = require('./sprite.png')
  const crop = {left: 10, top: 50, width: 20, height: 40}
  
  export const cartLogo = sprite({crop})
  // How do I apply the crop to the sprite?
  
  then
  
  &lt;Image source={cartLogo}/&gt;
  </code></pre>
  
  
  
  <p>I see how to crop the image in react-native when using <code>{uri: 'url-to-image', crop: {left: 10, top: 50, width: 20, height: 40}}</code> <a href="https://facebook.github.io/react-native/docs/images.html#source-as-an-object" rel="nofollow noreferrer">in here</a>. How to do it with <code>require</code>?.</p>