title: Captured Image is blurry in my android camera app
body: <p>I have developed my own camera app with some features and camera is working good.
  The issue are captured images were blurred on SD card and image quality and sizes are varying on different mobiles even camera pixels are good and same. 
  I don't know what is the problem on capturing and saving images in app. I have followed guidelines from developer page and few samples from github.</p>
  
  <p>I couldn't find exact solutions for my problem but some samples implemented bitmap and those pic's are good in quality. I have no idea about bitmap </p>
  
  <p>Any idea to solve this problem would be helpful for my further development.</p>
  
  <p>Code for pictureCallBack</p>
  
  <pre><code>Camera.AutoFocusCallback autoFocusCallback = new Camera.AutoFocusCallback() {
      @Override
      public void onAutoFocus(boolean success, Camera camera) {
          camera.takePicture(shutterCallback, rawPictureCallBack, null, jpegPictureCallback);
      }
  };
  </code></pre>
  
  <p>Thread to save images</p>
  
  <pre><code>FileOutputStream outStream = null;
          /**
           * Write to SD Card
           */
          try {
              File sdCard = Environment.getExternalStorageDirectory();
              File dir = new File(sdCard.getAbsolutePath() + "/MyCamera");
              dir.mkdirs();
  
              String fileName = String.format("%d.png", System.currentTimeMillis());
              File outFile = new File(dir, fileName);
  
              outStream = new FileOutputStream(outFile);
              outStream.write(data[0]);
              outStream.flush();
              outStream.close();
              runOnUiThread(new Runnable() {
                  @Override
                  public void run() {
                      retrieveLastImage();
                      showCustomAlert();
                  }
              });
              Log.d(DEBUG_TAG, "onPictureTaken - wrote bytes: " + data.length + " to " + outFile.getAbsolutePath());
              refreshGallery(outFile);
          } catch (FileNotFoundException e) {
              e.printStackTrace();
          } catch (IOException e) {
              e.printStackTrace();
          } finally {
          }
  </code></pre>