Var bitmap : tbitmap;
jpg : tjpegimage;
dc : hdc;
desktoprect : trect;
desktopcanvas : tcanvas;
x, y : integer;
begin
dc:=getdc(getdesktopwindow);
try
desktopcanvas:=tcanvas.create;
bitmap:=tbitmap.create;
jpg:=tjpegimage.create;
try
bitmap.Width:=320;
bitmap.Height:=240;
desktopcanvas.handle:=dc;
desktoprect:=rect(0,0,319,239);
bitmap.canvas.CopyRect(desktoprect,desktopcanvas,desktoprect);
img.Picture.Bitmap:=bitmap;
for y:=yy to yy+10 do
for x:=xx to xx+10 do
img.canvas.pixels[x,y]:=clwhite;
with jpg do
begin
compressionquality:=25;
assign(bitmap);
compress;
savetofile('data'+filename);
end;
finally
bitmap.free;
desktopcanvas.free;
end;
finally
releasedc(getdesktopwindow,dc);
end;
end;
domingo, 24 de maio de 2009
Assinar:
Postar comentários (Atom)
Nenhum comentário:
Postar um comentário