Class VerticalRotation

  • All Implemented Interfaces:
    Rotation

    public class VerticalRotation
    extends java.lang.Object
    implements Rotation
    Vertically rotates each column of given buffered image, returns a new buffered image

    Let's assume we've a column vector [1, 2, 3, 4, 5] of size 5x1, then its rotated i.e. reversed form will be like [5, 4, 3, 2, 1] which is also 5x1

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.image.BufferedImage rotate​(java.awt.image.BufferedImage img)
      Given a buffered image we'll reverse each column and they will be no doubt done concurrently, leveraging power of modern multicore processors
      java.awt.image.BufferedImage rotate​(java.lang.String src)
      Given path to image file, it'll be read & rotated, where actual vertical rotation implementation is present in method just above
      • Methods inherited from class java.lang.Object

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

      • VerticalRotation

        public VerticalRotation()
    • Method Detail

      • rotate

        public java.awt.image.BufferedImage rotate​(java.awt.image.BufferedImage img)
        Given a buffered image we'll reverse each column and they will be no doubt done concurrently, leveraging power of modern multicore processors

        Reversing each column is what we call vertically rotating image i.e. rotating image across its Y-axis 180°

        Specified by:
        rotate in interface Rotation
      • rotate

        public java.awt.image.BufferedImage rotate​(java.lang.String src)
        Given path to image file, it'll be read & rotated, where actual vertical rotation implementation is present in method just above
        Specified by:
        rotate in interface Rotation