Code example for Camera.Parameters

Methods: getPreviewFormat, getPreviewSize

0
	@Override 
	public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
		 mHolder.setFixedSize(w, h);
        // Start the preview 
        Parameters params = mCamera.getParameters();
        previewHeight = params.getPreviewSize().height;
        previewWidth = params.getPreviewSize().width;
        previewFormat = params.getPreviewFormat();
 
        // Crop the edges of the picture to reduce the image size 
        r = new Rect(100, 100, previewWidth - 100, previewHeight - 100);
 
        mCallbackBuffer = new byte[460800];
 
        mCamera.setParameters(params);
        mCamera.setPreviewCallbackWithBuffer(new PreviewCallback() {
            public void onPreviewFrame(byte[] imageData, Camera arg1) {
            	if (!busyProcessing) {
            		busyProcessing = true;
            		processImage(imageData);	
Connect your IDE to all the code out there  Get Codota for Java