Package in.itzmeanjan.filterit.rotation
Class VerticalRotation
- java.lang.Object
-
- in.itzmeanjan.filterit.rotation.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 imageLet'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
-
-
Constructor Summary
Constructors Constructor Description VerticalRotation()
-
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 processorsjava.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
-
-
-
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 processorsReversing each column is what we call vertically rotating image i.e. rotating image across its Y-axis 180°
-
-