From bd7db1445cd4840a90ba9747812573bf3d51a047 Mon Sep 17 00:00:00 2001 From: arunjose696 Date: Fri, 17 Oct 2025 15:16:06 +0200 Subject: [PATCH] Reverting a sideeffect introduced in #2526 This commit reverts the changes introduced in #2526 where getImageData and getScaledImageData were mistakenly interchanged. The initial approach aimed to use this method in loadImageDataClosestTo when images couldn't be loaded at the exact size. However, the final implementation used loadImageData(zoom) instead, making those changes unnecessary. These leftover modifications were an unintended side effect, and this commit removes them. --- .../Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 831bad7ae2..60aa4cc228 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 @@ -2028,7 +2028,7 @@ protected Optional loadImageDataAtExactSize(int width, int height) { } protected ImageHandle newImageHandle(ZoomContext zoomContext) { - ImageData resizedData = getScaledImageData (zoomContext.targetZoom()); + ImageData resizedData = getImageData (zoomContext.targetZoom()); return newImageHandle(resizedData, zoomContext); } @@ -2070,7 +2070,7 @@ protected Rectangle getBounds(int zoom) { @Override ImageData newImageData(ZoomContext zoomContext) { - return getImageData(zoomContext.targetZoom()); + return getScaledImageData(zoomContext.targetZoom()); } @Override