Java Utililty Methods Image Rotate

List of utility methods to do Image Rotate

Description

The list of methods to do Image Rotate are organized into topic(s).

Method

ImagerotateImage(Image originalImage, double theta)
Rotates the image around its center by the specified angle.
BufferedImage newImage = new BufferedImage(originalImage.getWidth(null), originalImage.getHeight(null),
        BufferedImage.TYPE_INT_ARGB_PRE);
Graphics2D g2d = newImage.createGraphics();
g2d.setRenderingHints(RENDERING_HINTS_HIGH_QUALITY);
g2d.rotate(theta, originalImage.getWidth(null) / (double) 2, originalImage.getHeight(null) / (double) 2);
g2d.drawImage(originalImage, 0, 0, null);
g2d.dispose();
return newImage;
...
booleanrotateImage(String img_fn, int orient, String dest_fn)
rotate Image
double radian = 0;
switch (orient) {
case 3:
    radian = 180.0;
    break;
case 6:
    radian = 90.0;
    break;
...