I am capturing the image from the native camera of device and showing it in another activity using imageview.Problem is that in OnActivityResult method i am getting the bitmap which is blurred.I want to get Bitmap of original size image.can anyone help me??Thanks in advance.This is my code in which i am getting the bitmap in onActivityResult method and save it to the sd card.The image is getting blurred from sd card.
camera.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
try {
Intent mIntent=new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(mIntent, CAMERA_PIC_REQUEST);
WookAtMeStaticVariables.retakePic=false;
} catch (Exception e) {
clickmessage="OnClickevent Exception"+e.getMessage();
showAlertDialogForCameraClickException(TakePic.this);
}
}
});
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
try {
if (requestCode == CAMERA_PIC_REQUEST && resultCode==RESULT_OK)
{
imageBitmap=(Bitmap)data.getExtras().get("data");
imageBitmap = Bitmap.createScaledBitmap (imageBitmap,750,750, false);
File file = new File(Environment.getExternalStorageDirectory(),"WookAtMepic"+System.currentTimeMillis()+".jpg");
WookAtMeStaticVariables.mImageFilePath=file.getAbsolutePath();
OutputStream outStream = null;
try {
outStream = new FileOutputStream(file);
imageBitmap.compress(Bitmap.CompressFormat.JPEG, 100, outStream);
outStream.flush();
outStream.close();
}
catch(Exception e)
{
e.printStackTrace();
}
Intent afterTakePicIntent= new Intent(TakePic.this,AfterTakePic.class);
startActivity(afterTakePicIntent);
}
} catch (Exception e) {
resultMessage="OnResultevent Exception"+e.getMessage();
showAlertDialogForCameraResultException(TakePic.this);
}
}