Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi TImage32 PaintTo() klappt nicht so richtig (https://www.delphipraxis.net/74119-timage32-paintto-klappt-nicht-so-richtig.html)

noch_ein_hannes 28. Jul 2006 10:43


TImage32 PaintTo() klappt nicht so richtig
 
Hi,

ich habe ein TImage32 mit mehreren Layers. Nun möchte ich das komplette Bild in ein neues (TBitmap32) kopieren. Also haber ich den Code aus dem Graphics32 Layers-Beispiel der sich hinter dem Button "flatten Layers" verbirgt kopiert.

Nun ist aber das Problem, dass mein Bild (ImgHolder) z.B. 255x255 Pixel gross ist und nach dem PaintTo() habe ich ein Bild (BitLow) von ca. 1/4 der Grösse. Hat vielleicht jemand einen Tipp?

hier der Code: (ImgHolder und BitLow habe ich im FormCreate jeweils auf 255x255Pixel gesetzt)
Delphi-Quellcode:
var
  B: TBitmap32;
  W, H: Integer;
begin
  W := ImgHolder.Bitmap.Width;
  H := ImgHolder.Bitmap.Height;
  B := TBitmap32.Create;
  try
    B.SetSize(W, H);
    ImgHolder.PaintTo(B, Rect(0, 0, W, H));
    BitLow.Bitmap := B;
  finally
    B.Free;
  end;
end;
grüsse,
hannes


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:07 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