Skip to content
Advertisement

How to improve image rotation quality in Graphics2D?

Currently I am using this code (which I found here) to rotate images in Java. The code works well, but I am not satisfied with the quality of the rotated image.

How can I improve it? Do it need a separate library that?

JavaScript

Advertisement

Answer

You should set RenderingHints.KEY_INTERPOLATION and RenderingHints.KEY_RENDERING as well.

Here is the complete working code:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement