Class RotateAntiClockwise90

  • All Implemented Interfaces:
    Rotation

    public class RotateAntiClockwise90
    extends java.lang.Object
    implements Rotation
    Given a buffered image, we'll rotate that image by 90° in anti-clockwise direction and obtain a new image, though original image buffer to stay unmodified. We'll perform this rotation as combination two basic operations

    i ) First transpose image matrix

    ii ) Then vertically rotate image matrix

    Now, note that, it's really required to apply aforementioned two transformations in same order as they were defined, otherwise that'll result into rotation by 270° in anti-clockwise direction

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.image.BufferedImage rotate​(java.awt.image.BufferedImage img)  
      java.awt.image.BufferedImage rotate​(java.lang.String src)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RotateAntiClockwise90

        public RotateAntiClockwise90()
    • Method Detail

      • rotate

        public java.awt.image.BufferedImage rotate​(java.awt.image.BufferedImage img)
        Specified by:
        rotate in interface Rotation
      • rotate

        public java.awt.image.BufferedImage rotate​(java.lang.String src)
        Specified by:
        rotate in interface Rotation