Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

WriteableBitmap WritePixels not updating

$
0
0

I am attempting to stream a series of images that I receive over the network from another computer and display them in a simple WPF application using WriteableBitmap. I'm basically ripping off of the Kinect DepthBasics-WPF example. The strange thing is the first two or so image loads just fine, but for any images afterward attempting to call the WritePixels method seems to fail as the Image on the canvas no longer changes. It's been brought up here that on some integrated Intel graphics cards that there seems to be a bug where hardware acceleration causes an instance of the WriteableBitmap to become inaccessible after a single cycle of lock/unlock. I tried turning off hardware acceleration as suggested and I even tested the code on a separate machine with an NVidia card. The problem still remained. I know for certain that the images being sent are changing, I have them dumped as files for debugging purposes, and at this point I'm running out of ideas for what to try. So, anyone run into this problem before? And have a workaround?

As an aside, out of desperation I tried resorting to a Direct2D application to do effectively the same thing, and ran into the same problem, the first two or so attempts to render a new "image" works, afterwards the image remains stuck on the second image. Confusingly, when I hacked the code to load the image off of disk instead of over network, it would switch between the images just fine.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>