formdan bulduğum bir örnekte ilk bölümü alıyorum ama ikinci bölümü alamadım yardımcı olurmusunuz teşekkürler...
320x480 lik kısım
Kod: Tümünü seç
procedure TForm1.Button1Click(Sender: TObject);
const
CopyWidth = 320;
CopyHeight = 480;
var
w,h:integer;
begin
w:=image1.Picture.Width div 320;
h:=image1.Picture.Height div 240;
Image2.Picture.Bitmap.Width := CopyWidth;
Image2.Picture.Bitmap.Height := CopyHeight;
Image2.Picture.Bitmap.Canvas.CopyRect(Rect(0, 0, CopyWidth, CopyHeight), Image1.Picture.Bitmap.Canvas, Rect(w, h, CopyWidth + w, CopyHeight + h));
end;
(320-640)x480 kısm
Kod: Tümünü seç
procedure TForm1.Button2Click(Sender: TObject);
const
CopyWidth = 320;
CopyHeight = 480;
var
w,h:integer;
begin
w:=image1.Picture.Width div 320;
h:=image1.Picture.Height div 240;
Image3.Picture.Bitmap.Width := CopyWidth;
Image3.Picture.Bitmap.Height := CopyHeight;
Image3.Picture.Bitmap.Canvas.CopyRect(Rect(0, 0, CopyWidth, CopyHeight), Image1.Picture.Bitmap.Canvas, Rect(w, h, CopyWidth + w, CopyHeight + h));
end;