-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCitra.java
51 lines (44 loc) · 1.3 KB
/
Citra.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Odz
*/
public class Citra {
private BufferedImage citra=null;
public static boolean manipulated;
public Citra(java.io.File file) {
try {
citra=javax.imageio.ImageIO.read(file);
} catch (IOException ex) {
Logger.getLogger(Citra.class.getName()).log(Level.SEVERE, null, ex);
}
}
public Citra(BufferedImage citra) {
this.citra = citra;
}
public void bersihkan() {
this.citra = null;
}
public void setCitra(BufferedImage citra) {
this.citra = citra;
}
public void setCitra(String citra) {
try {
this.citra = javax.imageio.ImageIO.read(new java.io.File(citra));
} catch (IOException ex) {
Logger.getLogger(Citra.class.getName()).log(Level.SEVERE, null, ex);
}
}
public BufferedImage getCitra() {
return citra;
}
}