Android Camera Size Get getPreviewSize(Camera.Parameters cp)

Here you can find the source of getPreviewSize(Camera.Parameters cp)

Description

get Preview Size

Declaration

public static Camera.Size getPreviewSize(Camera.Parameters cp) 

Method Source Code

//package com.java2s;
import android.hardware.Camera;

public class Main {
    public static Camera.Size getPreviewSize(Camera.Parameters cp) {
        Camera.Size size = cp.getPreferredPreviewSizeForVideo();

        if (size == null)
            size = cp.getSupportedPreviewSizes().get(0);

        return size;
    }//from   ww w.j  a v  a2 s.  co  m
}

Related

  1. getBestAspectPreviewSize(int displayOrientation, int width, int height, Camera.Parameters parameters, double closeEnough)
  2. getLargestPictureSize(CameraHost host, Camera.Parameters parameters)
  3. getOptimalPreviewSize(int displayOrientation, int width, int height, Camera.Parameters parameters)
  4. getSmallestPictureSize(Camera.Parameters parameters)
  5. getSizeLB(List sizes, int w, int h)
  6. getSizeRATIO(List sizes, int w, int h)
  7. getSizeSIZE(List sizes, int w, int h)
  8. getSizeWIDTH(List sizes, int w, int h)