Android examples for android.hardware:Camera Size
get Camera Smallest Picture Size
import android.hardware.Camera; public class Main { public static Camera.Size getSmallestPictureSize(Camera.Parameters parameters) { Camera.Size result = null;/* w w w . j a v a2 s . c o m*/ for (Camera.Size size : parameters.getSupportedPictureSizes()) { if (result == null) { result = size; } else { int resultArea = result.width * result.height; int newArea = size.width * size.height; if (newArea < resultArea) { result = size; } } } return (result); } }