Skip to content

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

@bbhxwl

Description

@bbhxwl
        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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions