pDeviceContext->BeginDraw();
LPVOID pFrame = AVIStreamGetFrame(pGetframe, Position);
BITMAPINFOHEADER* pBIH = (BITMAPINFOHEADER*)pFrame;
D2D1_SIZE_U size = D2D1::SizeU(pBIH->biWidth, pBIH->biHeight);
void* pData = (void*)((long long)pFrame + sizeof(BITMAPINFOHEADER));
int pitch = ((((pBIH->biWidth * pBIH->biBitCount) + 31) & ~31) >> 3);
D2D1_BITMAP_PROPERTIES properties;
properties.pixelFormat = D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_IGNORE);
properties.dpiX = properties.dpiY = 96;
ID2D1Bitmap* pBitmap = NULL;
HRESULT hr = pDeviceContext->CreateBitmap(size, pData, pitch, properties, &pBitmap);
D2D1_SIZE_F sizeDestination = pDeviceContext->GetSize();
D2D1_RECT_F rectDestination = D2D1::RectF(0, 0, sizeDestination.width, sizeDestination.height);
pDeviceContext->DrawBitmap(pBitmap, &rectDestination, 1.0, D2D1_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC);
pBitmap->Release();
hr = pDeviceContext->EndDraw();
Hello,
is the library actively maintained? I want to do basic bitmap drawing: