Re: Teile eines images kopieren und in anderes image einfüge
"var
a,b : Trect; begin a := rect(0,105,0,0); b := rect(0,105,0,0); image2.canvas.CopyRect(a,image1.picture.bitmap.can vas,b); end;" das kann ja nicht gehn :? a, b nehmen das ganze ja von der canvas des Forms! du musst es mit einem Rect AUS dem image nehmen :stupid: |
Re: Teile eines images kopieren und in anderes image einfüge
Hallo
Zitat:
wenn du für left und right 0 angibst, was glaubst du wird kopiert, eine spalte mit 0Pixeln-breite ? Der code ist richtig, nur definierst du das rechteck falsch. Mfg Frank |
Re: Teile eines images kopieren und in anderes image einfüge
und wie mach ich das?
Delphi-Quellcode:
geht auch nicht
procedure TForm1.Button1Click(Sender: TObject);
var a,b : Trect; begin a := rect(0,0,105,105); b := rect(0,0,105,105); image2.canvas.CopyRect(a,image1.picture.bitmap.canvas,b); end; |
Re: Teile eines images kopieren und in anderes image einfüge
:kotz:
|
Re: Teile eines images kopieren und in anderes image einfüge
ok dann halt der code ...
Delphi-Quellcode:
var i,j:integer;
Bild,teilBild:TBitmap; Bild:=TBitmapo.create(); bild.loadfromfile('c:\....'); For i:=0 to AnzahlX do For j:=0 to ANzahlY do begin teilBild:=TBitmap.create(); teilbild.copyrect(round(bild.width/AnzahlX*i),round(bild.height/AnzahlY*j), round(bild.width/AnzahlX*(i+1)),round(bild.height/AnzahlY*(j+1), bild); teilbild.savetofile(....); teilbild.free; end; |
Re: Teile eines images kopieren und in anderes image einfüge
Delphi-Quellcode:
ist das wirklich so schwer?
a := rect(100,100,200,200);
b := rect(links,oben,rechts,unten); |
Re: Teile eines images kopieren und in anderes image einfüge
aber er braucht es auch vom image das ist sein problem s.h mein post)
|
Re: Teile eines images kopieren und in anderes image einfüge
mah, das funktioniert nicht, und ich verstehe es nicht
|
Re: Teile eines images kopieren und in anderes image einfüge
:cry: ich kann auch nicht mehr amchen als das posten was bei mir geht :|
|
Re: Teile eines images kopieren und in anderes image einfüge
aso du musst natürlich kein bmp machen ich hab den code nur von nem prog kopiert
du nimmst statt bild zb image 1 :roll: |
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:59 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz