From 7b3059c48e5bf5c7b92ec01689a94119bcf66b4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Eisfeld?= Date: Fri, 26 Feb 2016 17:08:21 +0100 Subject: [PATCH] Removed PupilAndIrisDetector debugging code --- .../eisfeldj/augendiagnosefx/util/imagefile/ImageUtil.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/util/imagefile/ImageUtil.java b/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/util/imagefile/ImageUtil.java index c4c73ce3..6cdad1d9 100644 --- a/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/util/imagefile/ImageUtil.java +++ b/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/util/imagefile/ImageUtil.java @@ -514,12 +514,16 @@ else if (metadata != null && metadata.hasOverlayPosition() && overlayType != nul * * @param baseImage The original image. * @param targetSize The target size. + * @param allowGrowing flag indicating if the image is allowed to grow. * @return the resized image. */ - public static Image resizeImage(final Image baseImage, final int targetSize) { + public static Image resizeImage(final Image baseImage, final int targetSize, final boolean allowGrowing) { if (baseImage == null || baseImage.getWidth() == 0 || baseImage.getHeight() == 0) { return baseImage; } + if (baseImage.getWidth() <= targetSize && baseImage.getHeight() <= targetSize && !allowGrowing) { + return baseImage; + } int targetWidth; int targetHeight; if (baseImage.getWidth() > baseImage.getHeight()) {