On Sun, 13 Mar 2022 21:06:24 GMT, Alexander Zuev <kiz...@openjdk.org> wrote:

> Detect the situation where we do need to perform interpolation during 
> ImageIcon
> painting and set a hint to the rendering to perform bicubic approximation so
> image details are preserved during transition.

test/jdk/javax/swing/ImageIcon/MultiResolutionImageIcon.java line 127:

> 125:         return null;
> 126:     }
> 127: }

This test reads a little strange to me. (I'm not an official openjdk reviewer, 
though, so feel free to disregard.)

If I run this test with the existing ImageIcon class it creates an image that 
resembles:
![image](https://user-images.githubusercontent.com/7669569/158093894-be7a73c6-6936-4725-bb09-cd054a2dccc2.png)

If I run this test with the revised code it creates an image that resembles:
![image](https://user-images.githubusercontent.com/7669569/158093939-bffc62c7-7a5c-4b0e-b71e-710c5049daf6.png)

Based on the changes in ImageIcon: I only expected to see changes related to 
rendering hints. (That is: I expected to see differences in antialiasing and 
scaling artifacts.)

Would you mind if I proposed a different test?

-------------

PR: https://git.openjdk.java.net/jdk/pull/7805

Reply via email to