Image Quality Gets Ruined In Java Graphics2D Rotate

前端 未结 2 1627
不知归路
不知归路 2021-01-15 05:01

I am experiencing an issue with rotating an Image with the Graphics2D rotate method.

Here\'s an image of the issue I\'m having:

2条回答
  •  遥遥无期
    2021-01-15 05:36

    I know this is a pretty old question but for anyone looking to do something similar try putting the following code before your g.drawImage

    g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
    

    That should help to make the image look a better.

提交回复
热议问题