AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

Convert MJPEGStream to PictureBox in C#

The forum is to discuss topics related to different areas of image processing and computer vision.

Convert MJPEGStream to PictureBox in C#

Postby sonrhey » Thu Sep 28, 2017 9:27 am

Hello guys, its my first time to post here, i have a problem regarding displaying a feed from an IPCamera, the feed will display if ill use the Aforge video source but if i will use the Picture box in C# it will have an error "cannot implicitly convert Aforge.video.MJPEGStream to System.Drawing.Image",,


can anyone tell me how to convert it ? thanks in advance
sonrhey
 
Posts: 2
Joined: Thu Sep 28, 2017 9:19 am

Re: Convert MJPEGStream to PictureBox in C#

Postby andrew.kirillov » Thu Sep 28, 2017 11:43 am

Hello,

You can not convert one to another. What you need to do is handle NewFrame event of MJPEGStream and then do whatever you want with images from there (like display them in picture box).
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3453
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

Re: Convert MJPEGStream to PictureBox in C#

Postby sonrhey » Fri Sep 29, 2017 12:42 am

thank you sir for your reply, can you please share some of the code snippets on how to do it ? thank you in advance :)
sonrhey
 
Posts: 2
Joined: Thu Sep 28, 2017 9:19 am

Re: Convert MJPEGStream to PictureBox in C#

Postby andrew.kirillov » Fri Sep 29, 2017 7:00 am

The code is already shared. Have a look at sample applications provided with the framework.
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3453
Joined: Fri Jan 23, 2009 9:12 am
Location: UK




Return to Image Processing and Computer Vision