I am currently doing a fault reporting page whereby the end user is able to report an image
either by capturing using the camera or selecting a photo from the gallery. I am not sure why but when the image
is taken using the camera, the height
and width
returned is about 220
by 180
which is a very blur image. I have tried looking online for other tutorials but my code seems to be the same as the others. Not too sure if it is my phone or what.
My code for Camera Intent:
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, REQUEST_CAMERA);
My code after Capturing image from Camera:
thumbnail = (Bitmap) data.getExtras().get("data");
bytes = new ByteArrayOutputStream();
thumbnail.compress(Bitmap.CompressFormat.JPEG, 100, bytes);
ivImage.setVisibility(View.VISIBLE);
ivImage.setImageBitmap(thumbnail);
I've tried getting the width
and height
before and after compression, both returns the same value.