Hab´s jetzt so gelöst:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7:
| if x2 >= x1 then dx := x2-x1 else dx := x1-x2; if y2 >= y1 then dy := y2-y1 else dy := y1-y2; vbmp := TBitMap.create; vbmp.assign(image1.picture.bitmap); vbmp.canvas.copyrect(Rect(0,0,dx,dy), vbmp.canvas, rect(x1,y1,x2,y2)); vbmp.width := dx; vbmp.height := dy; |
Erst wird dem erstellten TBitMap das ganze Bild zugewiesen, dann wird der ausgewählte Bereich in die linke obere Ecke kopiert und das BitMap wird entsprechend verkleinert.
mfg
GSE
_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs
and the universe trying to produce bigger and better idiots. So far, the universe is winning. (Richard Cook)