Thema: WMF To PNG

Einzelnen Beitrag anzeigen

Benutzerbild von Uwe Raabe
Uwe Raabe

Registriert seit: 20. Jan 2006
Ort: Lübbecke
11.288 Beiträge
 
Delphi 12 Athens
 
#2

AW: WMF To PNG

  Alt 8. Jun 2024, 17:05
Probier mal dies:
Delphi-Quellcode:
  wmf := TMetafile.Create;
  wmf.LoadFromFile(...);

  png := TPngImage.CreateBlank(COLOR_RGB, 16, wmf.Width, wmf.Height);
  png.Transparent := True;
  png.TransparentColor := clNone;
  png.Canvas.Brush.Color := png.TransparentColor;
  png.Canvas.FillRect(TRect.Create(0, 0, png.Width, png.Height));
  png.Canvas.Draw(0, 0, wmf);
  ...
Uwe Raabe
Certified Delphi Master Developer
Embarcadero MVP
Blog: The Art of Delphi Programming
  Mit Zitat antworten Zitat