Java tutorial
//package com.java2s; import android.hardware.Camera.Size; public class Main { private static int getWidthGap(Size size, int wantWidth) { return Math.abs(size.height - wantWidth); } }