• 大小: 102KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-14
  • 语言: C#
  • 标签: C#  

资源简介

C#版图像处理界面,包含打开图像、保存图像、二值化、灰度化、旋转、翻转、放大、缩小等操作

资源截图

代码片段和文件信息

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

namespace Ex04_15
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        Image myImage;
        private void button1_Click(object sender EventArgs e)
        {
            openFileDialog1.Filter = “*.jpg*.jpeg*.bmp*.gif*.ico*.png*.tif*.wmf|*.jpg;*.jpeg;*.bmp;*.gif;*.ico;*.png;*.tif;*.wmf“;
            openFileDialog1.ShowDialog();
            myImage = System.Drawing.Image.FromFile(openFileDialog1.FileName);
            pictureBox1.Image = myImage;
            pictureBox1.Height = myImage.Height;
            pictureBox1.Width = myImage.Width;
        }

        private void button2_Click(object sender EventArgs e)
        {
            try
            {
                pictureBox1.Height = Convert.ToInt32(myImage.Height * Convert.ToSingle(textBox1.Text.Trim()));
                pictureBox1.Width = Convert.ToInt32(myImage.Width * Convert.ToSingle(textBox1.Text.Trim()));
            }
            catch { }
        }
    }
}

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

     文件       3221  2007-07-11 11:22  0805III\Backup\Ex04_15\Ex04_15.csproj

     文件       1227  2007-07-11 11:22  0805III\Backup\Ex04_15\Form1.cs

     文件       6149  2007-07-11 11:22  0805III\Backup\Ex04_15\Form1.Designer.cs

     文件       6017  2007-07-11 11:22  0805III\Backup\Ex04_15\Form1.resx

     文件        466  2007-07-11 11:22  0805III\Backup\Ex04_15\Program.cs

     文件       1162  2007-07-11 11:22  0805III\Backup\Ex04_15\Properties\AssemblyInfo.cs

     文件       2868  2007-07-11 11:22  0805III\Backup\Ex04_15\Properties\Resources.Designer.cs

     文件       5612  2007-07-11 11:22  0805III\Backup\Ex04_15\Properties\Resources.resx

     文件       1090  2007-07-11 11:22  0805III\Backup\Ex04_15\Properties\Settings.Designer.cs

     文件        249  2007-07-11 11:22  0805III\Backup\Ex04_15\Properties\Settings.settings

     文件        910  2007-07-11 11:22  0805III\Backup\Ex04_15.sln

    ..A..H.     16384  2011-08-05 21:45  0805III\Backup\Ex04_15.suo

     文件       3429  2011-08-05 21:45  0805III\Backup1\Ex04_15\Ex04_15.csproj

     文件       3544  2011-08-06 20:23  0805III\Backup1\Ex04_15\Form1.cs

     文件       5320  2011-08-05 23:24  0805III\Backup1\Ex04_15\Form1.Designer.cs

     文件       6017  2011-08-05 23:24  0805III\Backup1\Ex04_15\Form1.resx

     文件        466  2007-07-11 11:22  0805III\Backup1\Ex04_15\Program.cs

     文件       1162  2007-07-11 11:22  0805III\Backup1\Ex04_15\Properties\AssemblyInfo.cs

     文件       2838  2011-08-05 21:45  0805III\Backup1\Ex04_15\Properties\Resources.Designer.cs

     文件       5612  2007-07-11 11:22  0805III\Backup1\Ex04_15\Properties\Resources.resx

     文件       1105  2011-08-05 21:45  0805III\Backup1\Ex04_15\Properties\Settings.Designer.cs

     文件        249  2007-07-11 11:22  0805III\Backup1\Ex04_15\Properties\Settings.settings

     文件        911  2011-08-05 21:45  0805III\Backup1\Ex04_15.sln

    ..A..H.     18432  2011-08-06 20:23  0805III\Backup1\Ex04_15.suo

     文件      18944  2016-01-26 21:26  0805III\Ex04_15\bin\Debug\Ex04_15.exe

     文件      42496  2016-01-26 21:26  0805III\Ex04_15\bin\Debug\Ex04_15.pdb

     文件      11608  2016-01-28 21:28  0805III\Ex04_15\bin\Debug\Ex04_15.vshost.exe

     文件        490  2014-01-13 21:31  0805III\Ex04_15\bin\Debug\Ex04_15.vshost.exe.manifest

     文件       3962  2016-01-26 21:08  0805III\Ex04_15\Ex04_15.csproj

     文件      13666  2016-01-26 20:57  0805III\Ex04_15\Form1.cs

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

评论

共有 条评论