I run into an exception with the sample code:
java.lang.IllegalArgumentException: 2 is not compatible with Image interpolation method key
at sun.java2d.SunGraphics2D.setRenderingHint(Unknown Source)
on the line:
g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, hint);
This exception occurs on JVM 1.6.0.03.
It is nice with alternative code suggested by another reader. |