Hello community,
I want to load an image from the hard disk, then rotate it by 90° and then save the rotated version to another file. However, the following doesn't work:
Could you tell me what I am doing wrong and/or show me how it's done properly?
Well, thanks a lot, Craig! This worked! (Save for the src.getType(), but I just put in src.TYPE_INT_RGB)
g2.drawImage(src, ...) is really cool. I think I didn't know what to do because I didn't know what g2.drawImage(...) does. I used it before to draw BufferedImages on JPanels, but actually it's a function which copies image data to specific memory locations, isn't it?
It depends on the Graphics object. For BufferedImage, it's an in-memory object. For components it can be regarded as a representation of the screen. When printing it can be regarded as a representation of a paper sheet.