Einzelnen Beitrag anzeigen

striderx
Online

Registriert seit: 11. Feb 2007
Ort: Bergisch Gladbach
206 Beiträge
 
Delphi 10.4 Sydney
 
#4

AW: WICImage - out of memory [gelöst]

  Alt 8. Mär 2021, 13:54
Nach laaaaaangem Suchen habe ich wohl die Lösung gefunden: Man muss bei der Bitmap noch mal explizit des Pixelformat setzen:

Delphi-Quellcode:
  
if Assigned(BM) then begin
   BM.Width := SourceWidth;
   BM.Height := SourceHeight;
   BM.Canvas.Draw(0, 0, WICImage);
   BM.PixelFormat := pf24bit; <-- mus nach dem Draw erfolgen
end;

"To avoid this try to create DIB instead of TBitmap, or try to change Pixelformat to pf24bit. This will tell system to create Bitmap in user's memory instead of GDI buffer."

https://stackoverflow.com/questions/...tmap-on-delphi
  Mit Zitat antworten Zitat