• 大小: 0.19M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-03-27
  • 语言: 其他
  • 标签: 其他  

资源简介


用Silverlight截取摄像头视频截图并不是什么难事。本文的范例代码详细介绍了视频截取和两种保存截图的方式: 1.使用开源的FJCore.dll 把视频流转换成Jpeg 格式,保存到本地 2.选择使用把图片转换成Base64String,使用WCF,保存在Sqlserver数据库中。使用Base64String的方法,在数据库表里建一个varchar的字段就可以保存图片数据了。 3. 通过把图片流转换成Base64String保存到服务器数据库:

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Dengfengsoft_SilverlightWebCamExample
{
    public partial class App : Application
    {

        public App()
        {
            this.Startup += this.Application_Startup;
            this.Exit += this.Application_Exit;
            this.UnhandledException += this.Application_UnhandledException;

            InitializeComponent();
        }

        private void Application_Startup(object sender StartupEventArgs e)
        {
            this.RootVisual = new MainPage();
        }

        private void Application_Exit(object sender EventArgs e)
        {

        }

        private void Application_UnhandledException(object sender ApplicationUnhan

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-01-12 22:36  Dengfengsoft_SilverlightWebCamExample\
     目录           0  2012-01-12 22:58  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\
     文件        1001  2012-01-12 22:36  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample.sln
     文件       27136  2012-01-12 23:07  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample.suo
     目录           0  2012-01-12 22:36  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample.Web\
     文件         320  2012-01-12 22:36  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\App.xaml
     文件        2377  2012-01-12 22:36  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\App.xaml.cs
     文件         911  2012-01-12 22:59  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\base64Convert.cs
     目录           0  2012-01-12 22:36  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\Bin\
     目录           0  2012-01-12 23:07  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\Bin\Debug\
     文件         517  2012-01-12 23:07  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\Bin\Debug\AppManifest.xaml
     文件       16384  2012-01-12 23:06  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\Bin\Debug\Dengfengsoft_SilverlightWebCamExample.dll
     文件       30208  2012-01-12 23:06  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\Bin\Debug\Dengfengsoft_SilverlightWebCamExample.pdb
     文件       31610  2012-01-12 23:07  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\Bin\Debug\Dengfengsoft_SilverlightWebCamExample.xap
     文件        2898  2012-01-12 23:07  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\Bin\Debug\Dengfengsoft_SilverlightWebCamExampleTestPage.html
     文件       50688  2009-11-21 20:56  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\Bin\Debug\FJ.Core.dll
     文件      130560  2009-11-21 20:56  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\Bin\Debug\FJ.Core.pdb
     文件        5070  2012-01-12 22:59  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample.csproj
     文件        1142  2012-01-12 22:59  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample.csproj.user
     目录           0  2012-01-12 22:41  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\JpegEncoder\
     文件       50688  2009-11-21 20:56  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\JpegEncoder\FJ.Core.dll
     文件      130560  2009-11-21 20:56  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\JpegEncoder\FJ.Core.pdb
     文件        3059  2012-01-12 22:55  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\MainPage.xaml
     文件        6565  2012-01-12 23:06  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\MainPage.xaml.cs
     目录           0  2012-01-12 22:36  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\obj\
     目录           0  2012-01-12 23:07  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\obj\Debug\
     文件        1961  2012-01-12 22:36  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\obj\Debug\App.g.cs
     文件        1961  2012-01-12 22:36  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\obj\Debug\App.g.i.cs
     文件        2723  2012-01-12 23:07  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\obj\Debug\Dengfengsoft_SilverlightWebCamExample.csproj.FileListAbsolute.txt
     文件       16384  2012-01-12 23:06  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\obj\Debug\Dengfengsoft_SilverlightWebCamExample.dll
     文件        3637  2012-01-12 23:06  Dengfengsoft_SilverlightWebCamExample\Dengfengsoft_SilverlightWebCamExample\obj\Debug\Dengfengsoft_SilverlightWebCamExample.g.resources
............此处省略10个文件信息

评论

共有 条评论