I've been trying to got into Direct2D, and although successful up to this point, i'm stumped on how to implement the Chroma-key Effect on bitmaps. I'm trying to follow: https://msdn.microsoft.com/en-us/library/windows/desktop/dn890715(v=vs.85).aspx , but the code being 4-8 years out of date on average, means i can't find the same methods and functions in the intellisense documentation while typing the code. Has anyone done this before, and had success in making a graphical program? and could you please help me out?
Asked
Active
Viewed 520 times
0
-
Chroma-key is a pretty old-school technique. Why not just use images with an alpha channel? In any case, this Direct2D effect is supported in [Windows 10](https://msdn.microsoft.com/en-us/library/windows/desktop/hh802478.aspx#what_s_new_for_windows_10). What OS are you using? – Chuck Walbourn Aug 16 '16 at 05:22
-
Another issue you might be having is that you need the Windows 10 SDK to get access to the Direct2D Effects 1.1 headers. If you are using VS 2015, then you enable it via a [custom install option](https://blogs.msdn.microsoft.com/vcblog/2015/07/29/developing-for-windows-10-with-visual-c-2015/). The Windows 10 SDK isn't' officially supported on VS 2013 or earlier. – Chuck Walbourn Aug 16 '16 at 05:28
-
Don't waste your time, it is a very poor keyer. Something like we used to write 25 years ago. – Mike Versteeg Aug 16 '16 at 11:54
-
To Chuck Walbourn: i'm using windows 10 (the free upgrade from windows 8.1 version) and after checking the target system, i can see it's still targeting win. 8.1 so let me try those suggestions and i'll get to you later after work. thanks! :) – mrsamsir Aug 16 '16 at 12:38
-
OK, a 34-odd gigabyte update and upgrade latter, i have the proper headers, and now the proper keywords are working for the most part, but when i try creating a `chromakeyEffect` through the `ID2D1HwndRenderTarget` the intelisense says the method to do so does not exist. what all are the headers you use, and how are the render targets and factories implemented? or may it be something else? – mrsamsir Aug 20 '16 at 01:14
-
There is no `ID2D1HwndRenderTarget::CreateEffect`. There is, however, `ID2D1DeviceContext::CreateEffect`. Both interfaces are derived from `ID2D1RenderTarget`. – Roman R. Dec 02 '16 at 21:16
-
Chroma-key is already a built-in Direct2D effect. [Some links](http://stackoverflow.com/a/43747424/6655648). – Pablo H May 02 '17 at 21:27