Registriert seit: 24. Okt 2006
Ort: Seifhennersdorf / Sachsen
5.388 Beiträge
Delphi 12 Athens
|
AW: Größe in TImage
19. Feb 2012, 15:01
you have to change... is an Idea but can be wrong
Delphi-Quellcode:
var aPicture:TBitmap;
PictureName:string;
aSourceRect:TRect;
aDestinationRect;
begin
aPicture:=TBitmap.Create;
try
aPicture.Width:=100; // your cutted Size
aPicture.Height:=100; // your cutted Size
aDestinationRect:= (0,0,100,100);
aSourceRect:=Rect(100,200,200,300); // your cutted Rect
aPicture.Canvas.CopyRect(aDestinationRect, YourPaintBox.Canvas, aSourceRect); // Copy the Rect from the Paintbox to the Image
PictureName:= 'MyPicture'; // define the Name
aPicture.SaveToFile('YourFolder\' + PictureName + '.bmp');
finally
aPicture.free;
end
Geändert von haentschman (19. Feb 2012 um 15:15 Uhr)
|
|
Zitat
|