public class Graphics
extends java.lang.Object
http://mmazur.eu.org/podstawy-przetwarzania-obrazow-java/
Constructor and Description |
---|
Graphics(java.lang.String fileName)
Create new instance of class
|
Modifier and Type | Method and Description |
---|---|
void |
blackAndWhite(int ton)
Method to change image to black and white mode
|
void |
blackAndWhite(int ton,
boolean better)
Modifitied method to change image to black and white mode
|
void |
brightness(int howMore)
Method to change image's brightness
|
void |
changeColor(int color)
Method to change colour from picture to one of selected
|
void |
exaggeration(int h,
int s)
Method to change image exaggeration
|
void |
greyScale()
Method to change colour from picture to grey scale
|
void |
save(java.lang.String type,
java.lang.String fileName)
Method to save image to disc, if file exists - overwrite file.
|
void |
sepia()
Method to change colour from picture to sepia
|
public Graphics(java.lang.String fileName) throws java.io.IOException
fileName
- file from disk which is base to run classjava.io.IOException
public void changeColor(int color)
color
- 1-red, 2-green, 3-bluepublic void greyScale()
public void sepia()
public void brightness(int howMore) throws java.lang.IllegalAccessException
howMore
- How more you want to add brightnessjava.lang.IllegalAccessException
public void exaggeration(int h, int s) throws java.lang.IllegalArgumentException
h
- how much you want to add to H i HSV models
- how much you want to add to S i HSV modeljava.lang.IllegalArgumentException
public void save(java.lang.String type, java.lang.String fileName) throws java.io.IOException
type
- type of saved file ex. PNG, JPGfileName
- filename of file which will be savedjava.io.IOException
public void blackAndWhite(int ton)
ton
- how much sensitive it will bepublic void blackAndWhite(int ton, boolean better)
ton
- how much sensitive it will bebetter
- if true you will turn on modulate of ton