My app uses the camera to take pictures and sends the data someplace else. However, the picture sizes are too big in terms of bytes, or unecessarily big. But I'm not sure how to force the camera to take a smaller picture or after taking the picture, send a scaled down version of it.
This is how I go to the Camera screen.
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
intent.putExtra(MediaStore.EXTRA_OUTPUT,Uri.fromFile(getTempFile()));
startActivityForResult(intent, PIC_ONE);//first picture
And then onActivityResult I have:
...
BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize=4;
Bitmap mBitmap = BitmapFactory.decodeFile(getPath(myURI),options);
photoView.setImageBitmap(bmp);
Which shows the user a quarter sized thumbnail of the saved image. But of course the actual image is still retains its large size.
How can I reduce the image size?