Low picture/image quality when capture from camera
<p>I have one problem.when I try to get picture from camera, the quality is very low.
At first, capture the picture using camera, than save to the directory and at the same time get that picture and show in my app.The picture saved inside directory is a fine quality but when I get it from directory, the quality is low. below is my sample code:</p>

<blockquote>
  <p>public void onActivityResult(int requestCode, int resultCode, Intent intent) {</p>
</blockquote>

<pre><code>    if (requestCode == CAMERA_PIC_REQUEST) {  

        Bitmap thumbnail = (Bitmap) intent.getExtras().get("data");

        if (g==1)
        {
            ImageView myImage = (ImageView) findViewById(R.id.img5);
            myImage.setImageBitmap(thumbnail);

            View a = findViewById(R.id.img5);
            a.setVisibility(View.VISIBLE);

            ByteArrayOutputStream stream = new ByteArrayOutputStream();
            thumbnail.compress(Bitmap.CompressFormat.JPEG, 100, stream);
            byteArray1 = stream.toByteArray();
        }}
</code></pre>

<p>any solution/suggestion?
Thanks :)</p>

<p><strong>Solved</strong></p>

<p>The problem solved when I follow the code given by <a href="http://stackoverflow.com/users/451951/antrromet">Antrromet</a> below</p>
