Delphi-PRAXiS
Seite 1 von 2  1 2      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   Bitmap auf Bitmap kopieren (https://www.delphipraxis.net/159856-bitmap-auf-bitmap-kopieren.html)

thomas2009 15. Apr 2011 14:25

Bitmap auf Bitmap kopieren
 
Hi

wie kann ich image.picture.Bitmap auf eine Bitmap,
die ich at run time erstelle kopieren ?
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
bmp:TBitmap;
RR : TRect;
begin
bmp:=TBitmap.Create;
bmp.width:=400;
bmp.Height:=400;
bmp.PixelFormat := pf24bit;
// nun möchte ich eine kleine Bitmap (100x100) drauf malen

bmp.free;
end;

DeddyH 15. Apr 2011 14:30

AW: Bitmap auf Bitmap kopieren
 
Eine Bitmap besitzt zum Zeichnen einen Canvas. Nun schau einmal nach, was der so bietet.

Satty67 15. Apr 2011 14:31

AW: Bitmap auf Bitmap kopieren
 
Obwohl ich bisher wirklich (weitgehenst) vorurteilsfrei Deine Posts bewertet hatte, bin ich jetzt doch sehr erstaunt/enttäuscht das Du nach wochenlanger Beschäftigung mit Bitmaps an solch einer sehr einfachen Aufgabe scheiterst.

thomas2009 15. Apr 2011 14:32

AW: Bitmap auf Bitmap kopieren
 
Canvas auf Canvas ist klar
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
begin
  Image2.Canvas.CopyRect(
    Rect(0,0,Image2.Width,Image2.Height),
    Image1.Canvas,
    Rect(
      0,
      0,
      Image1.Picture.Width-10,
      Image1.Picture.Height-10));
end;

DeddyH 15. Apr 2011 14:33

AW: Bitmap auf Bitmap kopieren
 
Es gibt ja nicht nur CopyRect. Bemüh Dich endlich einmal selbst :!:

mkinzler 15. Apr 2011 14:38

AW: Bitmap auf Bitmap kopieren
 
Ich glaube, beim Reden gegen ein Wand, ist die Wahrscheinlichkeit, dass diese etwas lernt, größer :wall:

thomas2009 15. Apr 2011 15:11

AW: Bitmap auf Bitmap kopieren
 
Mit CopyRect geht auch :zwinker:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
begin
  bmp.Canvas.CopyRect(
    Rect(0,0,bmp.Width,bmp.Height),
    Image1.Canvas,
    Rect(
      0,
      0,
      Image1.Picture.Width-10,
      Image1.Picture.Height-10));
end;

mkinzler 15. Apr 2011 15:13

AW: Bitmap auf Bitmap kopieren
 
Man kann sein Fahrrad auch Schieben.

DeddyH 15. Apr 2011 15:14

AW: Bitmap auf Bitmap kopieren
 
Mach doch, was Du willst.

thomas2009 15. Apr 2011 20:19

AW: Bitmap auf Bitmap kopieren
 
Was meinst Du mit "mach was du willst"
Gibt es was alternatives :cyclops:


Alle Zeitangaben in WEZ +1. Es ist jetzt 12:50 Uhr.
Seite 1 von 2  1 2      

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