double ratio = getResizeRatio(requestedWidth, requestedHeight, origWidth, origHeight); int widthAfterStep1 = max(1, (int) Math.round(ratio * origWidth)); widthDelta = requestedWidth - widthAfterStep1;
double ratio = getResizeRatio(requestedWidth, requestedHeight, origWidth, origHeight); int widthAfterStep1 = max(1, (int) Math.round(ratio * origWidth)); widthDelta = requestedWidth - widthAfterStep1;
double ratio = getResizeRatio(requestedWidth, requestedHeight, origWidth, origHeight); int widthAfterStep1 = max(1, (int) Math.round(ratio * origWidth)); widthDelta = requestedWidth - widthAfterStep1;