I am using the following parameters for my custom camera
mCamera = getCameraInstance();
params = mCamera.getParameters();
params.setFlashMode(Camera.Parameters.FLASH_MODE_AUTO);
params.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE);
params.setSceneMode(Camera.Parameters.SCENE_MODE_AUTO);
params.setWhiteBalance(Camera.Parameters.WHITE_BALANCE_AUTO);
params.setExposureCompensation(0);
params.setPictureFormat(ImageFormat.JPEG);
params.setJpegQuality(100);
params.setRotation(90);
List<Size> sizes = params.getSupportedPictureSizes();
Camera.Size size = sizes.get(0);
params.setPictureSize(size.width, size.height);
mCamera.setParameters(params);
And after a photo is taken, the quality of the image is quite bad. I have autofocus and flash in use.
This is my method for taking the photo..
mCamera.autoFocus(new Camera.AutoFocusCallback() {
ShutterCallback shutterCallback = new ShutterCallback() {
@Override
public void onShutter() {
AudioManager mgr = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
mgr.playSoundEffect(AudioManager.FLAG_PLAY_SOUND);
}
};
PictureCallback pictureCallback = new PictureCallback() {
@Override
public void onPictureTaken(byte[] data,
Camera camera) {
...
}
};
public void onAutoFocus(boolean success, Camera camera) {
mCamera.takePicture(shutterCallback,
null, null, pictureCallback);
}
});
It is especially bad when the flash doesn't fire (I'm using auto flash) and the room I'm in is well lit..