mirror of
https://github.com/elisspace/autopsy.git
synced 2026-10-02 07:19:53 +00:00
replace ternary operator with Math.min()
This commit is contained in:
@@ -273,8 +273,7 @@ public class ImageUtils {
|
||||
} catch (IllegalArgumentException e) {
|
||||
// if resizing does not work due to extremely small height/width ratio,
|
||||
// crop the image instead.
|
||||
BufferedImage biCropped = ScalrWrapper.cropImage(bi, iconSize > bi.getWidth() ?
|
||||
bi.getWidth() : iconSize, iconSize > bi.getHeight() ? bi.getHeight() : iconSize);
|
||||
BufferedImage biCropped = ScalrWrapper.cropImage(bi, Math.min(iconSize, bi.getWidth()), Math.min(iconSize, bi.getHeight()));
|
||||
return biCropped;
|
||||
}
|
||||
catch (OutOfMemoryError e) {
|
||||
|
||||
Reference in New Issue
Block a user