* @param prefix prefix of parameter where parameter can be found.
* @return image model object.
* @throws ConverterException
*/
private Image getImage() throws ConverterException {
Image image = new Image();
setMediaParameters(image);
String limitParameter = getParameterValue(ParameterNames.MAX_IMAGE_SIZE);
if (limitParameter != null) {
image.setSizeLimit(Long.parseLong(limitParameter));
}
// Set image width
image.setWidth(getIntParameterValue(ParameterNames.IMAGE_WIDTH, 0));
// Set image transformations
Transformations transformations = getTransformations();
if (null != transformations) {
image.setTransformations(transformations);
}
return image;
}