I just tried placing BitmapSource.Create() into my callback function. Sure as hell didn't work. Got this:
An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
Additional information: Exception has been thrown by the target of an invocation.
... Thanks Microsoft! This WPF is super easy to use... ahem...
Reading around more. Looks like InteropBitmap may be a better way to do things.
InteropBitmap Link 1
That link states I can call Invalidate() on the "underlying bitmap" rather than on the Image. BitmapSource doesn't seem to have an Invalidate() call. Still a black image.
Update: The previous crash was so amazing it created a process I can't kill without rebooting. I also can't connect to the camera again until I end that process. Awesome.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment