12 public Image(int width, int height) {
15 pixel = new int[width][height];
18 public void setPixel(int x, int y, int R, int G, int B) {
19 pixel[x][y] = (R << 16) | (G << 8) | B;
22 public int getRed(int x, int y) {
23 return (pixel[x][y] >> 16) & 0xff;
26 public int getGreen(int x, int y) {
27 return (pixel[x][y] >> 8) & 0xff;
30 public int getBlue(int x, int y) {
31 return pixel[x][y] & 0xff;
34 public void setPixel(int x, int y, int p) {
38 public long getPixel(int x, int y) {
42 public int getWidth() {
46 public int getHeight() {