diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java index 12a78ed846..71d473e68e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java @@ -249,6 +249,9 @@ private InternalImageHandle getOrCreateImageHandleAtClosestSize(int widthHint, i int imageZoomForWidth = 100 * widthHint / bounds.width; int imageZoomForHeight = 100 * heightHint / bounds.height; int imageZoom = DPIUtil.getZoomForAutoscaleProperty(Math.max(imageZoomForWidth, imageZoomForHeight)); + if (imageZoom == 100) { + return getHandleInternal(100, 100); + } InternalImageHandle bestFittingHandle = imageHandleManager.get(imageZoom); if (bestFittingHandle == null) { ImageData bestFittingImageData = imageProvider.loadImageData(imageZoom).element(); @@ -957,6 +960,10 @@ public static long win32_getHandle (Image image, int zoom) { } ImageHandle getHandle (int targetZoom, int nativeZoom) { + return getHandleInternal(targetZoom, nativeZoom); +} + +private InternalImageHandle getHandleInternal(int targetZoom, int nativeZoom) { if (isDisposed()) { return null; }