if (targetRatio > sourceRatio) {
if (Math.abs(targetRatio) > Math.abs(sourceRatio)) {
	public static Dimension getSizeKeepRatio(Dimension source, Dimension target, boolean noStretch) {		if (noStretch && target.width > source.width && target.height > source.height) {			return null;		}		Dimension result = new Dimension();		float sourceRatio = (float) source.width / source.height;		float targetRatio = (float) target.width / target.height;		if (targetRatio > sourceRatio) {			result.height = target.height;			result.width = source.width * target.height / source.height;		} else {			result.width = target.width;			result.height = source.height * target.width / source.width;		}		return result;	}