Reputation: 1026
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.
Upvotes: 5
Views: 9582
Reputation: 3971
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);
Upvotes: 2
Reputation: 2386
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
Upvotes: 1
Reputation: 7881
What i am gonna write is not good practice to do code but it may full-fill your requirement
Upvotes: 2
Reputation: 12150
Implement a camera app by yourself. Use BitmapFactory
to decode raw data. Via BitmapFactory.Options
, you can set any resolution you want.
Upvotes: 1