Thema: WICImage

Einzelnen Beitrag anzeigen

mmw

Registriert seit: 10. Sep 2019
Ort: OWL
322 Beiträge
 
Delphi 11 Alexandria
 
#8

AW: WICImage

  Alt 29. Sep 2020, 20:16
hallo,
bei mir funktioniert es so

Delphi-Quellcode:
procedure ClearImage(im: TImage);

var
  Rec: TRect;
begin
    im.Picture:=nil;// <-----

    Im.Canvas.Brush.Color:=clBtnFace;
    Rec:=Rect(0, 0, Im.Width, Im.Height);
    Im.Canvas.FillRect(Rec);
end;
Delphi-Quellcode:
   try
       GPGraphics:=TGPGraphics.Create(img.Canvas.Handle);
       GPGraphics.DrawImage(GPImage, (img.Width - W) shr 1, (img.Height - H) shr 1, W, H)
vielleicht lieber so

Delphi-Quellcode:
GPGraphics:=TGPGraphics.Create(img.Canvas.Handle);

try
GPGraphics.DrawImage(GPImage, (img.Width - W) shr 1, (img.Height - H) shr 1, W, H)

Gruß
  Mit Zitat antworten Zitat