I want to capture photo and also save it to my sdcard using android camera.I know its easy but I want to store image in low resolution without telling user go to setting and set low resolution manually.
Asked
Active
Viewed 9,146 times
5
-
Check this link: http://stackoverflow.com/questions/7913282/open-android-camera-in-lower-resolution-with-action-image-capture – gunar Aug 14 '13 at 09:57
4 Answers
2
What i am gonna write is not good practice to do code but it may full-fill your requirement
- capture image as you do with normally using android default camera .
- check the path of that image which just now captured .
- reduce quality of that image as per requirement using BitmapFactory.Options calss and store in bitmap object
- delete that original image which captured by default camera
- save that bitmap object to SD Card where old image was located with same file name and path

dharmendra
- 7,835
- 5
- 38
- 71
2
I know this is very late but this is for the people who might read this question now , you can use this following code :
Camera.Parameters parameters = mcamera.getParameters();
List<Camera.Size> sizes = parameters.getSupportedPictureSizes();
Camera.Size size = sizes.get(sizes.size()-1);
Log.d("Parth","Size : "+size.height+","+size.width);
Log.d("Parth","Sizes:"+sizes.toString());
parameters.setPictureSize(size.width,size.height);
mcamera.setParameters(parameters);

Parth Anjaria
- 3,961
- 3
- 30
- 62
1
Implement a camera app by yourself. Use BitmapFactory
to decode raw data. Via BitmapFactory.Options
, you can set any resolution you want.

yushulx
- 11,695
- 8
- 37
- 64
1
Use this to capture image :
Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
cameraIntent.putExtra(MediaStore.ACTION_IMAGE_CAPTURE, preinsertedUri);
Don't use MediaStore.EXTRA_OUTPUT
because the image will be big size if you use EXTRA_OUTPUT

Harish Godara
- 2,388
- 1
- 14
- 28