Reputation: 2956
I want to use Direct2D in a DirectShow in-place video transform filter to render text and images on top of the video. To avoid extra copies, I implemented my own IWICBitmap subclass wrapping the media sample buffer and use CreateWicBitmapRenderTarget to make Direct2D write to that memory. My question is, did I miss a built-in WIC class to wrap existing memory into a bitmap?
Upvotes: 2
Views: 891
Reputation: 3174
IWICImagingFactory has a method that creates an IWICBitmap with a pointer to image data - http://msdn.microsoft.com/en-us/library/ee690291%28v=vs.85%29.aspx - but it sounds like that just copies the data from memory to a new buffer. The only other way to create an IWICBitmap is through other IWICImagingFactory methods that look unhelpful, so most likely there's nothing in WIC that does what you want.
Upvotes: 1