Skip to content

Commit 62a9633

Browse files
committed
[FIXUP] Fine-tuning
1 parent a4727a1 commit 62a9633

File tree

1 file changed

+3
-2
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image

1 file changed

+3
-2
lines changed

bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/FileFormat.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
import org.eclipse.swt.*;
2222
import org.eclipse.swt.graphics.*;
23+
import org.eclipse.swt.internal.*;
2324

2425
/**
2526
* Abstract factory class for loading/unloading images from files or streams
@@ -66,8 +67,8 @@ ImageData[] loadFromByteStream(int zoom) {
6667
return loadFromByteStream();
6768
}
6869
return Arrays.stream(loadFromByteStream()).map(data -> {
69-
int width = (int) Math.round(data.width * zoom / 100.);
70-
int height = (int) Math.round(data.height * zoom / 100.);
70+
int width = DPIUtil.scaleUp(data.width, zoom);
71+
int height = DPIUtil.scaleUp(data.height, zoom);
7172
return data.scaledTo(width, height);
7273
}).toArray(ImageData[]::new);
7374
}

0 commit comments

Comments
 (0)