How to crop an attached image in android?
<pre><code>     I want to crop an image  from attachment before displaying it in my activity.. i m really struggled in this... 
</code></pre>

<p>// Here is mycode  for cropping an image</p>

<pre><code>               Intent bigimgintent = new Intent("com.android.camera.CropImage"); 
                    bigimgintent.setClassName("com.android.gallery", "com.android.camera.CropImage"); 
                    bigimgintent.putExtra("crop", "true"); 
            bigimgintent.putExtra("scale",false); 
                bigimgintent.putExtra("return-data", return_data);
    bigimgintent.putExtra("outputX",  1024); 
        bigimgintent.putExtra("outputY", 768); 
bigimgintent.putExtra(MediaStore.EXTRA_OUTPUT,uri);
             bigimgintent.putExtra("outputFormat",Bitmap.CompressFormat.JPEG.toString());

    if (circleCrop)
     { 
    bigimgintent.putExtra("circleCrop", true); 
               }
                 startActivityForResult(bigimgintent,1);
</code></pre>
