package pic;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
class pro extends Frame{
PixelGrabber pg;
Color col;
Image img;
int w;
int h;
int memor=new int[h][w];
int memog=new int[h][w];
int memob=new int[h][w];
int m,n;
int num;
String s1,s2;
public static void main(String[] args) {
pro f = new pro();
f.setSize(600,600);
f.setBackground(Color.blue) ;
f.setVisible(true);
f.addWindowListener(new WindowAdapter(){public void
windowClosing(WindowEvent e){System.exit(0);}});
}
pro() {
String str;
str="k.jpg";
w=400;
h=400;
catchimg sub=new catchimg();
sub.w=w;
sub.h=h;
sub.makedata(str);
memor=sub.memor;
memog=sub.memog;
memob=sub.memob;
}
public void paint( Graphics g ) {
int i,mx,nx,z,pp;
g.setColor(Color.blue);
g.fillRect(0,0,600,600);
mx=1;
nx=1;
for (mx=0;mx<h;mx++){
for (nx=0;nx<w;nx++){
g.setColor(new Color(memor[mx][nx],memog[mx][nx],memob[mx][nx]));
g.fillRect(nx+100,mx+100,1,1);
}
}
}
}