资源简介

由于工业上使用平板探测器拍摄图片,其保存的是RAW或者SMV格式的文件,不能直接使用图片查看器打开,本事例提供了把RAW和SMV格式文件转换为对应的BMP文件。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FileRead
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void OpenToolStripMenuItem_Click(object sender EventArgs e)
        {
            OpenFileDialog open = new OpenFileDialog();
            open.Filter = “*.tif文件|*.tif|所有文件|*.*“;

            if (open.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            if (open.FileName == null)
            {
                return;
            }
            string pathsource = open.FileName;
            Helper.Path = pathsource;
            int len = open.FileName.Length;
            string str = open.FileName.Substring(len - 3 3);


            if (str == “tif“ || str == “TIF“)
            {
                ReadTIF read = new ReadTIF();
                read.TifFile();
                read.WriteFile(this);
            }
        }

        private void SaveToolStripMenuItem_Click(object sender EventArgs e)
        {

        }

        private void QuitToolStripMenuItem_Click(object sender EventArgs e)
        {
            this.Close();
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    ..A..H.     69632  2018-11-06 10:07  read raw smv\.vs\FileReadPro\v14\.suo

     文件       3802  2012-04-19 16:26  read raw smv\Backup\FileRead\FileRead.csproj

     文件       1417  2012-04-19 16:26  read raw smv\Backup\FileRead\Form1.cs

     文件       5921  2011-10-10 20:45  read raw smv\Backup\FileRead\Form1.Designer.cs

     文件       6012  2011-10-10 20:45  read raw smv\Backup\FileRead\Form1.resx

     文件        411  2011-10-02 08:47  read raw smv\Backup\FileRead\Helper.cs

     文件        489  2011-10-02 08:35  read raw smv\Backup\FileRead\Program.cs

     文件       1366  2011-10-02 08:35  read raw smv\Backup\FileRead\Properties\AssemblyInfo.cs

     文件       2866  2011-10-02 08:35  read raw smv\Backup\FileRead\Properties\Resources.Designer.cs

     文件       5612  2011-10-02 08:35  read raw smv\Backup\FileRead\Properties\Resources.resx

     文件       1093  2011-10-02 08:35  read raw smv\Backup\FileRead\Properties\Settings.Designer.cs

     文件        249  2011-10-02 08:35  read raw smv\Backup\FileRead\Properties\Settings.settings

     文件       5280  2011-10-16 21:22  read raw smv\Backup\FileRead\ReadTIF.cs

     文件        914  2011-10-02 08:35  read raw smv\Backup\FileReadPro.sln

     文件      22704  2020-08-31 15:38  read raw smv\FileRead\bin\Debug\FileRead.vshost.exe

     文件        490  2016-07-16 19:44  read raw smv\FileRead\bin\Debug\FileRead.vshost.exe.manifest

     文件       3998  2018-07-20 13:50  read raw smv\FileRead\FileRead.csproj

    ..A..H.      7168  2012-04-19 16:34  read raw smv\FileRead\FileReadPro.suo

     文件       1355  2020-08-31 15:37  read raw smv\FileRead\Form1.cs

     文件       5146  2020-08-31 15:37  read raw smv\FileRead\Form1.Designer.cs

     文件       5814  2020-08-31 15:37  read raw smv\FileRead\Form1.resx

     文件      18328  2020-08-31 15:34  read raw smv\FileRead\ImageProcess.cs

     文件       1231  2020-08-31 15:20  read raw smv\FileRead\obj\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6840  2020-08-31 15:38  read raw smv\FileRead\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件       6815  2020-08-31 15:38  read raw smv\FileRead\obj\Debug\FileRead.csproj.FileListAbsolute.txt

     文件       3584  2018-07-12 09:13  read raw smv\FileRead\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

     文件        489  2011-10-02 08:35  read raw smv\FileRead\Program.cs

     文件       1366  2011-10-02 08:35  read raw smv\FileRead\Properties\AssemblyInfo.cs

     文件       2856  2018-07-12 09:11  read raw smv\FileRead\Properties\Resources.Designer.cs

     文件       5612  2011-10-02 08:35  read raw smv\FileRead\Properties\Resources.resx

............此处省略27个文件信息

评论

共有 条评论