Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If WPF uses the image control, if you want to refresh the image of the camera, refresh it for a while, it will not be refreshed. Why? #53

Open
bbhxwl opened this issue Feb 3, 2022 · 0 comments

Comments

@bbhxwl
Copy link

bbhxwl commented Feb 3, 2022

        private void VideoCapture_NewFrame(object sender, AForge.Video.NewFrameEventArgs eventArgs)
        {
            var bitmap = eventArgs.Frame;
            if (bitmap != null)
            {
                try
                {
                    this.Dispatcher.Invoke(() =>
                    {
                        try
                        {
                           // bitmap.Save("D:\\a.jpg", ImageFormat.Jpeg);
                            imgHead.Source = BitmapToBitmapImage(bitmap);

                        }
                        catch (Exception)
                        {


                        }
                    });

                }
                catch (Exception)
                {


                }

            }



        }

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant