How to save captured image without compress
<p>I want to capture image and save it to storage. For storing am using below code</p>

<pre><code> @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if(this.requestCode == requestCode &amp;&amp; resultCode == RESULT_OK){

            File root = new File(Environment.getExternalStorageDirectory(), "Feedback");
            if (!root.exists()) {
                root.mkdirs();
            }
            File file = new File(root, Constants.PROFILE_IMAGE_NAME+".jpeg");
            checkFlowIdisPresent(file);



            Bitmap photo = (Bitmap)data.getExtras().get("data");

            photo = ThumbnailUtils.extractThumbnail(photo, 300, 300);


            ByteArrayOutputStream bytes = new ByteArrayOutputStream();
            photo.compress(Bitmap.CompressFormat.JPEG, 100, bytes);

            try {
                FileOutputStream fo = new FileOutputStream(file);
                fo.write(bytes.toByteArray());
                fo.close();

            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }

            displayPic();


        }
    }
</code></pre>

<p>Now the problem is image quality is lost. So how to save an image without losing its quality.
if am using <code>photoPickerIntent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);</code> to save image it doesn't losing its quality but the problem is i wanted to resize the image 300*300.
Please help me out.</p>