public long transform( BufferedImage src, OutputStream os, @Nullable Integer _targetWidth, @Nullable Integer targetHeigth, String outputFormat, boolean allowDistort) throws IOException, IllegalArgumentException { Integer targetWidth = Check.ifNull(_targetWidth, src.getWidth()); int[] g = clipCalc(src.getWidth(), src.getHeight(), targetWidth, targetHeigth, allowDistort); return transform(src, os, outputFormat, g); }