簡體   English   中英

如何在C#控制台應用程序中使用metricam保存圖像

[英]how to save images with metricam in c# console application

我正在使用此代碼從網絡攝像頭獲取圖像,我猜想它的Metricam庫

有誰知道如何在不使用圖片框的情況下獲取圖像?

WebCam camera = new WebCam();
camera.Connect();
pictureBox1.Image = camera.GetBitmap();
pictureBox1.Image.Save(@"c:\image1 " + ".Jpeg", ImageFormat.Jpeg);

pictureBox1.ImageImage類型。 它可以自己處理保存。 當從PictureBox使用它時,它也確實處理保存,請注意如何在Image屬性而不是pictureBox實例上調用Save()方法。

WebCam camera = new WebCam();
camera.Connect();
Image image = camera.GetBitmap();
image.Save(@"c:\image1 " + ".Jpeg", ImageFormat.Jpeg);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM