java.lang.ObjectImage
public class Image
Constructor Summary | |
---|---|
Image(java.lang.String filename)
Constructor creates a new Image given the path to a PPM file. |
Method Summary | |
---|---|
void |
flipHorizontal()
Flip the image horizontally |
void |
flipVertical()
Flip the image vertically |
void |
inverseTransform()
This transformation inverts all Pixels in the current Image. |
void |
logTransform(double coeff)
This transformation adjusts the intensity of all Pixels in the current Image using the Log function. |
void |
open(java.lang.String filename)
Open a PPM file and return a 2D array of pixels |
void |
powerLawTransform(double coeff,
double gamma)
This transformation adjusts the intensity of all Pixels in the current Image using the Power Law. |
void |
rotateClockwise()
Rotate image left |
void |
rotateCounterClockwise()
Rotate image right |
void |
save(java.lang.String filename)
Writes contents of current Image into the file specified |
java.lang.String |
toString()
The String representation of this image. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Image(java.lang.String filename)
filename
- Method Detail |
---|
public void flipHorizontal()
public void flipVertical()
public void inverseTransform()
public void logTransform(double coeff)
coeff
- non-negative coefficientpublic void open(java.lang.String filename)
filename
- is a path to the PPM file to be openedpublic void powerLawTransform(double coeff, double gamma)
coeff
- non-negative coefficientgamma
- exponentpublic void rotateClockwise()
public void rotateCounterClockwise()
public void save(java.lang.String filename)
filename
- The name of file into which to save current image.public java.lang.String toString()
toString
in class java.lang.Object