procedure new;
var i,j:integer;
R,G,B:integer;
x,y:real;
px,py:integer;
p1,p2,p3,p4:longint;
begin
for i:=0 to 300-1 do
begin
py:=trunc(i*x+0.5);
for j:=0 to 400-1 do
begin
px:=trunc(j*y+0.5);
p1:=map.Canvas.Pixels[px ,py ];
p2:=map.canvas.pixels[px+1,py ];
p3:=map.canvas.pixels[px ,py+1];
p4:=map.canvas.pixels[px+1,py ];
R:=((p1 and $FF0000)+(p2 and $FF0000)+(p3 and $FF0000)+(p4 and $FF0000)) shr 18;
G:=((p1 and $FF00)+(p2 and $FF00)+(p3 and $FF00)+(p4 and $FF00)) shr 10;
B:=((p1 and $FF)+(p2 and $FF)+(p3 and $FF)+(p4 and $FF)) shr 2;
map1.Canvas.Pixels[j,i]:=(R shl 16)+(G shl 8)+B;
end;
end;
end;