Ich gehe davon aus, dass du dein Bild intern in irgendeiner Struktur hälst, die ein Canvas besitzt (also z.B. TBitmap, TJPEGImage)... Jetzt erstellst du dir nochmal ein TBitmap und nimmst da die Prozedur CopyRect von dessen Canvas:
Delphi-Quelltext
1: 2: 3: 4:
| bmpNew := TBitmap.Create; bmpNew.Height := 480; bmpNew.Width := 640; bmpNew.Canvas.CopyRect(Rect(0, 0, bmpNew.Width, bmpNew.Height), bmpSource.Canvas, Rect(0, 0, bmpSource.Width, bmpSource.Height)); |
bmpSource wäre in dem Fall das Bitmap, in dem du im Moment das Bild hälst (wenn du es in einem TBitmap hälst).
MrSaint
Andrew S. Tanenbaum - Modern Operating Systems