[英]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.Image
是Image
類型。 它可以自己處理保存。 當從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.