]、。·ˉˇ¨〃々—~‖…’”〕〉》」』〗】∶!"'),.:;?]` procedure TForm1.Button1Click(Sender: TObject);
var
abmp,bbmp:tbitmap;
scale:real;
p:tpoint;
begin
abmp:=tbitmap.Create;
bbmp:=tbitmap.Create;
p.x:=10;
p.y:=10;
if open.Execute then
begin
abmp.LoadFromFile(open.FileName);
scale:=abmp.Width/800;
bbmp.Width:=round(abmp.Width/scale);
bbmp.Height:=round(abmp.Height/scale);
bbmp.PixelFormat:=abmp.PixelFormat;
SetStretchBltMode(bbmp.Canvas.Handle,COLORONCOLOR);
//if SetBrushOrgEx(bbmp.Canvas.Handle,0,0,@p) then
begin
stretchblt(bbmp.Canvas.Handle,0,0,bbmp.Width,bbmp.Height,abmp.Canvas.Handle,0,0,abmp.Width,abmp.Height,srccopy);
bbmp.SaveToFile('c:\windows\desktop\aaa.bmp');
end;
end;
abmp.Free;
bbmp.Free;
end;