1

Below are images produced with code from https://www.tutorialspoint.com/java_dip/java_buffered_image.htm.

The one on the left is compiled/ran with JRE 1.8 SE and on the right with OpenJDK 15. You can see the difference in quality as 1.8 is much sharper.

Images of 2 versions:

https://i.stack.imgur.com/s5xAU.png

Does anyone know of a reason of a fix with 15? Is it just the nature of OpenJDK?

Thanks!

akuzminykh
  • 4,522
  • 4
  • 15
  • 36
MartinH
  • 33
  • 3
  • 3
    looks like you have scaling on the second version. – camickr Feb 11 '21 at 20:44
  • It's the exact same code I ran in 2 different installs. The openJDK seems bigger in all ways. – MartinH Feb 11 '21 at 22:10
  • Neither. Since Java 9, Java graphics takes Windows scaling into account. I'm guessing that you have Windows scaling at 125 or 150 percent. Check out this [Stack Overflow question](https://stackoverflow.com/questions/30824996/java-is-it-possible-to-disable-windows-dpi-scaling-from-within-java). – Gilbert Le Blanc Feb 11 '21 at 22:54
  • 1
    Ahhhhh, yes, reducing it to 100% in Windows took care of the issues, but I can't depend on other users doing that. I'm unable to find the setting in Eclipse yet.... Thank!! – MartinH Feb 12 '21 at 00:31
  • 1
    See: https://stackoverflow.com/a/64600797/131872 for a couple of ways to control the scaling. – camickr Feb 12 '21 at 01:42
  • 1
    Excellent, thank you @camickr. – MartinH Feb 13 '21 at 03:19

0 Answers0