Einzelnen Beitrag anzeigen

Kas Ob.

Registriert seit: 3. Sep 2023
467 Beiträge
 
#7

AW: ID2D1Bitmap1 von TBitmap erstellen

  Alt Gestern, 07:53
Hi,
Es wir leider nur ein weißes Bild ausgegeben bei D2DContext.DrawBitmap(CreateBitmap(Bitmap), @LRect, 1, D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR);
I see what might be the problem, so :

Check and handle the result of GetDIBits, did it fail ? Most likely it did !
If it did not fail then try to fill Buf with something before calling GetDIBits (even random values), see if it does output something, if that didn't help then a small but more complete code that handle ID2D1DeviceContext could greatly help.

on side note: the problem is also could be easily the bitmap you are trying to convert is problematic, see https://learn.microsoft.com/en-us/wi...tmapinfoheader there is few field you are not filling and leaving it to zero state like biCompression if this is used then size of Buf might be different.
Kas
  Mit Zitat antworten Zitat