logger.trace("api");
ImageManager im = new ImageManager(new File(inFileName).toURI().toURL());
logger.trace("im");
RenderedImage ri = im.scaleImageByPixel(tmpSize, tmpSize, ImageManager.SCALE_BY_PERCENT, intRotation);
logger.trace("ri");
JpegInterpreter pi = new JpegInterpreter(ri);
logger.trace("pi");
FileOutputStream outputFileStream = new FileOutputStream(outFileName);
logger.trace("output");
pi.writeToStream(null, outputFileStream);
logger.trace("write stream");
outputFileStream.close();
logger.trace("close stream");
} else {
String cs = ConfigMain.getParameter("goobiContentServerUrl") + inFileName + "&scale=" + tmpSize + "&rotate=" + intRotation + "&format=jpg";