.Net应用程序从pda相机捕获图像

时间:2010-02-23 05:35:16

标签: c# .net windows-mobile

我需要一个.net应用程序与pda的摄像头进行交互,以便使用保存按钮(在我的应用程序中)我可以保存在sql server中,使用缩放按钮(在我的应用程序中)我可以缩放图像。

1 个答案:

答案 0 :(得分:1)

嗯,乍一看你的问题就像你在应用程序之后做的那样(这就是为什么我投票将这个问题视为非编程相关的问题)

但是......如果你实际上是在这个紧凑的框架代码之后,这可能会有所帮助(我会尝试反转我的投票......)

CameraCaptureDialog cameraCapture = new CameraCaptureDialog();

cameraCapture.Owner = null;
cameraCapture.InitialDirectory = @"\My Documents";
cameraCapture.DefaultFileName = @"test.3gp";
cameraCapture.Title = "Camera Demo";
cameraCapture.VideoTypes = CameraCaptureVideoTypes.Messaging;
cameraCapture.Resolution = new Size(176, 144);
cameraCapture.VideoTimeLimit = new TimeSpan(0, 0, 15);  // Limited to 15 seconds of video.
cameraCapture.Mode = CameraCaptureMode.VideoWithAudio;

if (DialogResult.OK == cameraCapture.ShowDialog())
{
    Console.WriteLine("The picture or video has been successfully captured to:\n{0}", cameraCapture.FileName);
}

此代码摘自MSDN article on the CameraCaptureDialog