public class image{
public static void main(String[] args ){
BufferedImage image = ImageIO.read(new file(image1.bmp));
int width = image.getWidth();
int height = image.getheight();
result = new int[width][height];
for(int i =0 ; i < width; i++){
for(int j =0 ; j < height; j++){
result[i][j] = image.getRGB(i,j) & 0*FFFFFF;
}
} public void imageSource(){
int i=0;
int j=0;
matrix = new int[width*2][height*2];
for(int x =0 ; x < width*2; x=x+2){
for(int y =0 ; y < height*2; y=y+2){
matrix[x][y] = result [i][j];
matrix[x+1][y] = result [i][j];
matrix[x][y+1] = result [i][j];
matrix[x+1][y+1] = result [i][j];
i++; j++;
}
}
}
Graphics graphics = bufferedImage.createGraphics();
Graphics.drawImage(component.createImage(imageSource, 0,0,null));