Skip to content
Advertisement

Java: Rotating Images

I need to be able to rotate images individually(in java). The only thing I have found so far is g2d.drawImage(image, affinetransform, ImageObserver ). Unfortunately, I need to draw the image at a specific point, and there is no method with an argument that 1.rotates the image separately and 2. allows me to set the x and y. any help is appreciated

Advertisement

Answer

This is how you can do it. This code assumes the existance of a buffered image called ‘image’ (like your comment says)

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