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. src/java.desktop/share/classes/javax/swing/ImageIcon.java line 463: > 461: if (hintChanged) { > 462: ((Graphics2D) > g).setRenderingHint(RenderingHints.KEY_INTERPOLATION, > 463: oldHint == null ? > RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR : oldHint); Isn't the state of the Graphics object modified? Previously, the `KEY_INTERPOLATION` hint was set to `null` but it is set to `VALUE_INTERPOLATION_NEAREST_NEIGHBOR` on exit. Why can't it be set to `null`? Always to `oldHint`? ------------- PR: https://git.openjdk.java.net/jdk/pull/7805