I'm looking for a good alternative to the javax.imageio package, that lets me do simple rotating, cutting and scaling operations on images. For example, I would like to do
int angle, height, width;
image.rotateRight(angle).scale(height, width);
in order to obtain an image that is rotated angle degrees to the right and scaled down to height x width pixels.
Using Graphics2D and BufferedImages, I will have to do this, which is neither readable, nor easy to write:
BufferedImage result = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
Graphics2D graphics = result.createGraphics();
graphics.translate(height/2, width/2);
graphics.rotate(angle);
graphics.translate(-width/2, -height/2);
graphics.drawImage(image, 0, 0, width, height, null);
(Actually, that code doesn't even account for non-square images, which will require me to do even more magic with the translating).