.keepAspectRatio(true)
.useOriginalFormat()
.toOutputStream(outputStream);
} else {
throw new ImageException(String.format("Image resize not necessary. Already %d x %d", originalImageWidth, originalImageHeight));
}
}
} catch (IOException e) {
throw new ImageException(e.getMessage(), e);
} finally {
closeInputStream(inputStream);
}
return outputStream;