All pastes #2047931 Raw Edit

Anonymous

public text v1 · immutable
#2047931 ·published 2011-04-18 21:00 UTC
rendered paste body
        int ISampleGrabberCB.BufferCB(double SampleTime, IntPtr pBuffer, int BufferLen)
        {
            App.Current.Dispatcher.BeginInvoke(
                new MethodInvokerDelegate(delegate()
                {
                    try
                    {
                        CurrentImage = BitmapSource.Create(width, height, 96, 96, PixelFormats.Rgb24, null, pBuffer, BufferLen, stride);
                    }
                    catch { }
                }
            ));
            return 0;
        }