Android Camera Get getLowestResolution(Camera.Parameters cp)

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

Description

get Lowest Resolution

Declaration

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

Method Source Code

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

import java.util.List;

public class Main {
    public static Camera.Size getLowestResolution(Camera.Parameters cp) {
        List<Camera.Size> sl = cp.getSupportedVideoSizes();

        if (sl == null)
            sl = cp.getSupportedPictureSizes();

        Camera.Size small = sl.get(0);/*from  w w  w. j ava  2s . c  o m*/

        for (Camera.Size s : sl) {
            if ((s.height * s.width) < (small.height * small.width))
                small = s;
        }

        return small;
    }
}

Related

  1. getDefaultFrontFacingCameraInstance()
  2. getNumberOfCameras()
  3. getDefaultBackFacingCameraInstance()
  4. getCameraRotation(final Context context)
  5. indexOfClosestZoom(Camera.Parameters parameters, double targetZoomRatio)
  6. launchCamera(Activity activity)