title: Titanium - Crop portion of image
body: <p>How would you crop a small portion of a big image (e.g area of an imageview visible in a transparent frame) in appcelerator titanium for both iOS and android? imageAs*<em>*</em> functions won't work as they aren't supported below android 3.0 . Here is my code:</p>
  
  <pre><code>var win=Ti.UI.createWindow({backgroundColor: 'white'})
  
  var ImageView = Titanium.UI.createImageView({
                       width:200, height:200,
                  });
  var cropView = Titanium.UI.createView({
                       width: 150,
                       height: 150,
                       borderColor: 'red',
                       borderWidth: 1,
                       zIndex: 1,
                 });
  var button= Ti.UI.createButton({
                       bottom: 30,
                       width: 60,
                       title: 'OK',
                       zIndex: 1,
                  })
  
  win.add(cropView)
  
  Ti.Media.openPhotoGallery({
         PhotoGalleryOptionsType : Ti.Media.MEDIA_TYPE_PHOTO,
         success: function(e){
                  ImageView.image=e.media;
                  win.add(ImageView)
         }, });
  button.addEventListener('click',function(e)
  {
       // crop the visible area
  })
  </code></pre>
  
  <p>I am using iOS 5 and android 2.2. Thanks for your help.</p>