title: There is any function for image cropping basing on svg annotation in Cairo python?
body: <p>I have JPG images and with inputsvgdraw, a flash tool for image annotation (<a href="http://www.mainada.net/inputdraw" rel="nofollow">http://www.mainada.net/inputdraw</a>).</p>
  
  <p>As Gimp or Picasa, when i crop an image and i save as new image only the cropped part. I need a function that take svg path (representing new image bourders) as parameter and then basing on that, create the new image.</p>
  
  <p>svg data:</p>
  
  <pre><code>&lt;svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 488 325"&gt;&lt;g fill="none"   stroke-miterlimit="6" stroke-linecap="round" stroke-linejoin="round"&gt;&lt;path d="M 307 97 l 0 -1 l -2 -1 l -10 -2 l -20 -1 l -25 5 l -22 9 l -10 9 l 0 9 l 2 12 l 16 18 l 25 11 l 25 5 l 17 -1 l 6 -4 l 3 -7 l -1 -12 l -6 -16 l -7 -13 l -11 -12 l -11 -14 l -9 -5" opacity="1" stroke="rgb(170,37,34)" stroke-width="5"/&gt;&lt;/g&gt;&lt;/svg&gt;.
  </code></pre>
  
  <p>How can i extract and save in a new image inside circle part image? There is any library that handle this?
  There is a way convert these datas for a function in a image library in python and cropping image?</p>