Autor Beitrag
GSE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: Di 08.04.03 15:47 
Hi Leutz,
Ich möchte den Inhalt einer TImage Kompo (also, das was man sieht) in eine andere TImage Kompo einfügen. Ich hab´s so probiert:Image2.canvas.copyrect(Rect(0,0,80,80), Image1.canvas, Rect(0,0,80,80));Aber ich bekomme dann immer den Fehler: "Ein Bild kann nur geändert werden, wenn es ein Bitmap enthält". Wie kann ich also Inhalte kopieren, auch wenn ich z.Bsp. Jpg´s geladen habe.

Bin für jede Hilfe dankbar!

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)
maximus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 896

Win XP, Suse 8.1
Delphi 4/7/8 alles prof
BeitragVerfasst: Di 08.04.03 16:22 
Möglicherwise mitImage2.assign(Image1);mal testen..manchmal gehts manchmal nicht 8)

_________________
mfg.
mâximôv
GSE Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: Di 08.04.03 16:46 
Ich glaube du hast mich falsch verstanden:
Ich meinte das ich nur den Inhalt(das Bild) des Images übernehme.

Kurzes Beispiel:
-In Image1 ein Jpg laden (120x120)
-Image1.stretch := true
-image1 Größe auf 80x80 setzen
-In Image2 den Inhalt von Image1 laden
-jetzt ist in Image2 das 80x80 Bild!

trotzdem thx
sonst noch jemand Ideen?

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)
Aya
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1964
Erhaltene Danke: 15

MacOSX 10.6.7
Xcode / C++
BeitragVerfasst: Di 08.04.03 17:01 
Hi,

so sollte es gehen:
ausblenden Quelltext
1:
Image1.Picture.Assign(Image2.Picture);					


Au'revoir,
Aya~

_________________
Aya
I aim for my endless dreams and I know they will come true!
GSE Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: Di 08.04.03 18:56 
Hab´s jetzt so rausgefunden:image2.canvas.stretchdraw(rect(0,0,80,80), image1.picture.graphic); That´s it!

@Aya: Bei deiner Version übernimmt er ja das Bild in Originalgröße, ich wollte es aber gestretcht übernehmen

Trotzdem Danke an euch!

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)