I am trying to use WIC to load picture from the file and display it on screen with Direct2D. I follow the MSDN example but I encounter a problem with the function CreateBitmapFromWicBitmap(). No matter which combination of pixel formats I use during ID2D1HwndRenderTarget creation and IWICFormatConverter::Initialize() function calling, function [...] read more
I’m using the .Net Direct2D API in “Windows API Code Pack for .NET” to improve the drawing performance, it always throws the “Exception from HRESULT: 0x88982F80” when creating the CompatibleRenderTarget from DcRenderTarget, I don’t know why, it has been troubled me for two days. And here is my code: var [...] read more
I am using ID2D1RenderTarget::CreateBitmap from D2D1.h to create ID2D1Bitmap from array of pixels but this function returns 0x88982f80 (WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT) and ID2D1Bitmap* is NULL There is a code to create a bitmap: hr = m_pRenderTarget->CreateBitmap( D2D1::SizeU(10, 10), src, 4 * 10, D2D1::BitmapProperties(D2D1::PixelFormat(DXGI_FORMAT_R8G8B8A8_UNORM, D2D1_ALPHA_MODE_STRAIGHT)), &bitmap ); if (hr < 0) exit(1); // [...] read more
I am converting a BitmapImage from byte array, and it works fine, except with one specific .tif file. It gives an exception at EndInit(): > The bitmap pixel format is unsupported. (Exception from HRESULT: 0x88982F80) The code used to read the byte array to BitmapImage is: public BitmapImage LoadImage(byte[] ImageData) [...] read more
I want to scale a 1920x1080 image to 1280x720. The source and destination buffers are both in main memory. Each pixel is 8 bits. The images are the Y component of a video frame. For best performance, I want to avoid buffer copy. IWICBitmapScaler can do the scaling but is [...] read more