How to take some portion of image from camera
<p>in my android app, i want to use camera to take some portion of image. i can draw a rectangle above the camera so users can pick what part of image they want. but i dont know how to take/save the image according to the rectangle's size. </p>

<p>In my thought, i have to take full screen image, save it to sdcard then crop the image according to the rectangle's size. but i think that a long way. any simple one? i expect get the portion of the image in this code :</p>

<pre><code>Camera.PictureCallback mPictureCallback = new Camera.PictureCallback() {
    public void onPictureTaken(byte[] imageData, Camera c){
        if(imageData != null){
            Intent mIntent = new Intent();
            //
            //--&gt;get the image portion
            //
            SaveImageToDisk(mContext, imageData, 50, "ImageName");
            mCamera.startPreview();

            setResult(FOTO_MODE, mIntent);
            finish();
        }
    }
};
</code></pre>

<p>the camera only take a picture as same size as the rectangle.</p>
