NIHVIVO-1013 Merge 5482 from the branch.
This commit is contained in:
parent
b92982dcc0
commit
d277692365
1 changed files with 4 additions and 1 deletions
|
@ -223,6 +223,9 @@ public class ImageUploadHelper {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new IllegalStateException("Can't read image file: "
|
throw new IllegalStateException("Can't read image file: "
|
||||||
+ fileInfo, e);
|
+ fileInfo, e);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new UserMistakeException("Sorry, we were unable to process "
|
||||||
|
+ "the photo you provided. Please try another photo.");
|
||||||
} finally {
|
} finally {
|
||||||
if (source != null) {
|
if (source != null) {
|
||||||
try {
|
try {
|
||||||
|
@ -461,7 +464,7 @@ public class ImageUploadHelper {
|
||||||
scaleParams.add(0.0F); // y translate
|
scaleParams.add(0.0F); // y translate
|
||||||
scaleParams.add(interpolation);
|
scaleParams.add(interpolation);
|
||||||
RenderedOp image2 = JAI.create("scale", scaleParams);
|
RenderedOp image2 = JAI.create("scale", scaleParams);
|
||||||
|
|
||||||
JPEGEncodeParam encodeParam = new JPEGEncodeParam();
|
JPEGEncodeParam encodeParam = new JPEGEncodeParam();
|
||||||
encodeParam.setQuality(1.0F);
|
encodeParam.setQuality(1.0F);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue