0

I want that my camera to capture specified size of images, I am opening camera in my application using Camera Intent in android. please give me guide lnes

Thanks

user2462737
  • 208
  • 2
  • 11

2 Answers2

0

try to set setPictureSize on the camera parameters

Parameters parameters = camera.getParameters();
parameters.set("jpeg-quality", 70);
parameters.setPictureFormat(PixelFormat.JPEG);
parameters.setPictureSize(2048, 1232);
camera.setParameters(parameters);

Check this: Camera intent with resolution parameters in Android

Community
  • 1
  • 1
someUser
  • 965
  • 12
  • 24
0

Use Camera.Size to specify the dimensions for pictures:

http://developer.android.com/reference/android/hardware/Camera.Size.html

Possibly, you may need to crop the image to be captured by your camera if not fitted:

How to crop an image in android?

Community
  • 1
  • 1
sjain
  • 23,126
  • 28
  • 107
  • 185