android Programming Glossary: mcamera.setdisplayorientation
Force a camera to always open in portrait mode in android http://stackoverflow.com/questions/10259299/force-a-camera-to-always-open-in-portrait-mode-in-android
Android Camera in Portrait on SurfaceView http://stackoverflow.com/questions/2543059/android-camera-in-portrait-on-surfaceview
Android - Camera preview is sideways http://stackoverflow.com/questions/3841122/android-camera-preview-is-sideways hardware see here but can be overcome by using the call to mCamera.setDisplayOrientation degrees available in API 8. So this is how I implement it public.. parameters.setPreviewSize height width mCamera.setDisplayOrientation 90 if display.getRotation Surface.ROTATION_90 parameters.setPreviewSize.. parameters.setPreviewSize width height mCamera.setDisplayOrientation 180 mCamera.setParameters parameters previewCamera And the..
Android: Jpeg saved from camera looks corrupted http://stackoverflow.com/questions/5859876/android-jpeg-saved-from-camera-looks-corrupted ImageFormat.JPEG mCamera.setParameters parameters mCamera.setDisplayOrientation 90 mCamera.startPreview This is the snapshot button event handler..
Show my Layout while SurfaceView is loading Camera Preview http://stackoverflow.com/questions/7119164/show-my-layout-while-surfaceview-is-loading-camera-preview 8 If API 8 rotate display... mCamera.setDisplayOrientation 90 try mCamera.setPreviewDisplay holder catch IOException..
Android Camera will not work. startPreview fails http://stackoverflow.com/questions/7942378/android-camera-will-not-work-startpreview-fails mPreviewSize.height previewHeight mPreviewSize.width mCamera.setDisplayOrientation 90 break case Surface.ROTATION_90 previewWidth mPreviewSize.width.. mPreviewSize.width previewHeight mPreviewSize.height mCamera.setDisplayOrientation 180 break final int scaledChildHeight previewHeight width..
Force a camera to always open in portrait mode in android http://stackoverflow.com/questions/10259299/force-a-camera-to-always-open-in-portrait-mode-in-android
Android Camera in Portrait on SurfaceView http://stackoverflow.com/questions/2543059/android-camera-in-portrait-on-surfaceview
Android - Camera preview is sideways http://stackoverflow.com/questions/3841122/android-camera-preview-is-sideways This issue appeared to start out as a bug with certain hardware see here but can be overcome by using the call to mCamera.setDisplayOrientation degrees available in API 8. So this is how I implement it public void surfaceChanged SurfaceHolder holder int format int.. WINDOW_SERVICE .getDefaultDisplay if display.getRotation Surface.ROTATION_0 parameters.setPreviewSize height width mCamera.setDisplayOrientation 90 if display.getRotation Surface.ROTATION_90 parameters.setPreviewSize width height if display.getRotation Surface.ROTATION_180.. height width if display.getRotation Surface.ROTATION_270 parameters.setPreviewSize width height mCamera.setDisplayOrientation 180 mCamera.setParameters parameters previewCamera And the previewCamera method public void previewCamera try mCamera.setPreviewDisplay..
Android: Jpeg saved from camera looks corrupted http://stackoverflow.com/questions/5859876/android-jpeg-saved-from-camera-looks-corrupted size.width size.height parameters.setPictureFormat ImageFormat.JPEG mCamera.setParameters parameters mCamera.setDisplayOrientation 90 mCamera.startPreview This is the snapshot button event handler public void onSnapshotButtonClick View target void android.hardware.Camera.takePicture..
Show my Layout while SurfaceView is loading Camera Preview http://stackoverflow.com/questions/7119164/show-my-layout-while-surfaceview-is-loading-camera-preview p mCamera.getParameters mCamera.setParameters p if android.os.Build.VERSION.SDK_INT 8 If API 8 rotate display... mCamera.setDisplayOrientation 90 try mCamera.setPreviewDisplay holder catch IOException e e.printStackTrace mCamera.startPreview mPreviewRunning true..
Android Camera will not work. startPreview fails http://stackoverflow.com/questions/7942378/android-camera-will-not-work-startpreview-fails display.getRotation case Surface.ROTATION_0 previewWidth mPreviewSize.height previewHeight mPreviewSize.width mCamera.setDisplayOrientation 90 break case Surface.ROTATION_90 previewWidth mPreviewSize.width previewHeight mPreviewSize.height break case Surface.ROTATION_180.. break case Surface.ROTATION_270 previewWidth mPreviewSize.width previewHeight mPreviewSize.height mCamera.setDisplayOrientation 180 break final int scaledChildHeight previewHeight width previewWidth cameraView.layout 0 height scaledChildHeight..
|