format= WritebleImageFormat.png;
}
resizedImage=StorageUtils.resizeImage(fileContent.toByteArray(), format, dimensions);
//save the resized image for future requests
dao.storeResizedPicture(file, sizePattern, resizedImage);
return resizedImage;
}catch ( InvalidModelException e) {
throw new RuntimeException("A very strange error occurred! ",e);
}catch (OutOfMemoryError e){
throw new FileTooBigException();