Try fix photo

This commit is contained in:
Alexey Kulish 2015-12-24 17:56:15 +03:00
parent cd5a402540
commit 031528b172

View file

@ -887,7 +887,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
} }
int cameraOrientation = getCamOrientation(mapActivity, Camera.CameraInfo.CAMERA_FACING_BACK); int cameraOrientation = getCamOrientation(mapActivity, Camera.CameraInfo.CAMERA_FACING_BACK);
//cam.setDisplayOrientation(cameraOrientation); cam.setDisplayOrientation(cameraOrientation);
parameters.set("rotation", cameraOrientation); parameters.set("rotation", cameraOrientation);
if (mPreviewSize != null) { if (mPreviewSize != null) {
parameters.setPreviewSize(mPreviewSize.width, mPreviewSize.height); parameters.setPreviewSize(mPreviewSize.width, mPreviewSize.height);
@ -1143,7 +1143,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
parameters.setPictureSize(selectedCamPicSize.width, selectedCamPicSize.height); parameters.setPictureSize(selectedCamPicSize.width, selectedCamPicSize.height);
log.debug("takePhotoWithCamera() set Picture size: width=" + selectedCamPicSize.width log.debug("takePhotoWithCamera() set Picture size: width=" + selectedCamPicSize.width
+ " height=" + selectedCamPicSize.height); + " height=" + selectedCamPicSize.height);
/*
// camera focus type // camera focus type
autofocus = true; autofocus = true;
parameters.setGpsLatitude(lat); parameters.setGpsLatitude(lat);
@ -1177,7 +1177,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
log.info("Osmand:AudioNotes set camera FOCUS_MODE_AUTO"); log.info("Osmand:AudioNotes set camera FOCUS_MODE_AUTO");
break; break;
} }
/*
if (parameters.getSupportedWhiteBalance() != null if (parameters.getSupportedWhiteBalance() != null
&& parameters.getSupportedWhiteBalance().contains(Parameters.WHITE_BALANCE_AUTO)) { && parameters.getSupportedWhiteBalance().contains(Parameters.WHITE_BALANCE_AUTO)) {
parameters.setWhiteBalance(Parameters.WHITE_BALANCE_AUTO); parameters.setWhiteBalance(Parameters.WHITE_BALANCE_AUTO);
@ -1187,9 +1187,8 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
parameters.setFlashMode(Parameters.FLASH_MODE_AUTO); parameters.setFlashMode(Parameters.FLASH_MODE_AUTO);
} }
*/ */
autofocus = false;
int cameraOrientation = getCamOrientation(mapActivity, Camera.CameraInfo.CAMERA_FACING_BACK); int cameraOrientation = getCamOrientation(mapActivity, Camera.CameraInfo.CAMERA_FACING_BACK);
//cam.setDisplayOrientation(cameraOrientation); cam.setDisplayOrientation(cameraOrientation);
parameters.set("rotation", cameraOrientation); parameters.set("rotation", cameraOrientation);
if (mPreviewSize != null) { if (mPreviewSize != null) {
parameters.setPreviewSize(mPreviewSize.width, mPreviewSize.height); parameters.setPreviewSize(mPreviewSize.width, mPreviewSize.height);