欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

利用C#實(shí)現(xiàn)批量圖片格式轉(zhuǎn)換功能

 更新時間:2022年12月09日 11:16:50   作者:芝麻粒兒  
這篇文章主要為大家詳細(xì)介紹了如何利用C#實(shí)現(xiàn)批量圖片格式轉(zhuǎn)換功能,文中的示例代碼講解詳細(xì),感興趣的小伙伴可以跟隨小編一起學(xué)習(xí)一下

實(shí)踐過程

效果

代碼

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

    string[] path1 = null; //用于存儲選擇的文件列表
    string path2 = ""; //用于存儲保存的路徑
    Bitmap bt; //聲明一個轉(zhuǎn)換圖片格式的Bitmap對象
    Thread td; //聲明一個線程
    int Imgtype1; //聲明一個變量用于標(biāo)記ConvertImage方法中轉(zhuǎn)換的類型
    string OlePath; //聲明一個變量用于存儲ConvertImage方法中原始圖片的路徑
    string path; //聲明一個變量用于存儲ConvertImage方法中轉(zhuǎn)換后圖片的保存路徑
    int flags; //用于標(biāo)記已轉(zhuǎn)換圖片的數(shù)量,用于計(jì)算轉(zhuǎn)換進(jìn)度

    private void Form2_Load(object sender, EventArgs e)
    {
        tscbType.SelectedIndex = 0; //設(shè)置第一個轉(zhuǎn)換類型被選中
        CheckForIllegalCrossThreadCalls = false; //屏蔽線程彈出的錯誤提示
    }

    private void toolStripButton3_Click(object sender, EventArgs e) //選擇轉(zhuǎn)換文件的按鈕
    {
        if (openFileDialog1.ShowDialog() == DialogResult.OK) //判斷是否選擇文件
        {
            listView1.Items.Clear(); //清空listView1
            string[] info = new string[7]; //存儲每一行數(shù)據(jù)
            FileInfo fi; //創(chuàng)建一個FileInfo對象,用于獲取圖片信息
            path1 = openFileDialog1.FileNames; //獲取選擇的圖片集合
            for (int i = 0; i < path1.Length; i++) //讀取集合中的內(nèi)容
            {
                //獲取圖片名稱
                string ImgName = path1[i].Substring(path1[i].LastIndexOf("\\") + 1,
                    path1[i].Length - path1[i].LastIndexOf("\\") - 1);
                //獲取圖片類型
                string ImgType = ImgName.Substring(ImgName.LastIndexOf(".") + 1,
                    ImgName.Length - ImgName.LastIndexOf(".") - 1);
                fi = new FileInfo(path1[i].ToString()); //實(shí)例化FileInfo對象
                //將每一行數(shù)據(jù)第一個位置的圖標(biāo)添加到imageList1中
                imageList1.Images.Add(ImgName, Properties.Resources.圖標(biāo)__23_);
                info[1] = ImgName; //圖片名稱
                info[2] = ImgType; //圖片類型
                info[3] = fi.LastWriteTime.ToShortDateString(); //圖片最后修改日期
                info[4] = path1[i].ToString(); //圖片位置
                info[5] = (fi.Length / 1024) + "KB"; //圖片大小
                info[6] = "未轉(zhuǎn)換"; //圖片狀態(tài)
                ListViewItem lvi = new ListViewItem(info, ImgName); //實(shí)例化ListViewItem對象
                listView1.Items.Add(lvi); //將信息添加到listView1控件中
            }

            tsslFileNum.Text = "當(dāng)前共有" + path1.Length.ToString() + "個文件"; //狀態(tài)欄中顯示圖片數(shù)量
        }
    }

    private void toolStripButton2_Click(object sender, EventArgs e) //關(guān)閉按鈕
    {
        Application.Exit(); //退出系統(tǒng)
    }

    private void toolStripButton5_Click(object sender, EventArgs e) //清空列表的按鈕
    {
        listView1.Items.Clear(); //清空列表
        path1 = null; //清空圖片的集合
        tsslFileNum.Text = "當(dāng)前沒有文件"; //狀態(tài)欄中提示
        tsslPlan.Text = ""; //清空進(jìn)度數(shù)字
    }

    private void toolStripButton1_Click(object sender, EventArgs e)
    {
        if (path1 == null) //判斷是否選擇圖片
        {
            MessageBox.Show("請選擇圖片!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
        else
        {
            if (path2.Length == 0) //判斷是否選擇保存位置
            {
                MessageBox.Show("請選擇保存位置!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                flags = 1; //初始化flags變量為1,用于計(jì)算進(jìn)度
                toolStrip1.Enabled = false; //當(dāng)轉(zhuǎn)換開始時,禁用工具欄
                int flag = tscbType.SelectedIndex; //判斷將圖片轉(zhuǎn)換為何種格式
                switch (flag) //根據(jù)不同的格式進(jìn)行轉(zhuǎn)換
                {
                    case 0:
                        Imgtype1 = 0; //如果選擇第一項(xiàng)則轉(zhuǎn)換為BMP格式
                        td = new Thread(new ThreadStart(ConvertImage)); //通過線程調(diào)用ConvertImage方法進(jìn)行轉(zhuǎn)換
                        td.Start();
                        break;
                    case 1: //如果選擇第二項(xiàng)則轉(zhuǎn)換為JPG格式
                        Imgtype1 = 1;
                        td = new Thread(new ThreadStart(ConvertImage)); //通過線程調(diào)用ConvertImage方法進(jìn)行轉(zhuǎn)換
                        td.Start();
                        break;
                    case 2: //如果選擇第三項(xiàng)則轉(zhuǎn)換為PNG格式
                        Imgtype1 = 2;
                        td = new Thread(new ThreadStart(ConvertImage)); //通過線程調(diào)用ConvertImage方法進(jìn)行轉(zhuǎn)換
                        td.Start();
                        break;
                    case 3: //如果選擇第四項(xiàng)則轉(zhuǎn)換為GIF格式
                        Imgtype1 = 3;
                        td = new Thread(new ThreadStart(ConvertImage)); //通過線程調(diào)用ConvertImage方法進(jìn)行轉(zhuǎn)換
                        td.Start();
                        break;
                    default:
                        td.Abort();
                        break;
                }
            }
        }
    }

    private void toolStripButton4_Click(object sender, EventArgs e) //選擇保存路徑按鈕
    {
        if (folderBrowserDialog1.ShowDialog() == DialogResult.OK) //判斷是否選擇保存路徑
        {
            path2 = folderBrowserDialog1.SelectedPath; //獲取保存路徑
        }
    }

    private void ConvertImage()
    {
        flags = 1;
        switch (Imgtype1)
        {
            case 0:
                for (int i = 0; i < path1.Length; i++)
                {
                    string ImgName = path1[i].Substring(path1[i].LastIndexOf("\\") + 1,
                        path1[i].Length - path1[i].LastIndexOf("\\") - 1);
                    ImgName = ImgName.Remove(ImgName.LastIndexOf("."));
                    OlePath = path1[i].ToString();
                    bt = new Bitmap(OlePath);
                    path = path2 + "\\" + ImgName + ".bmp";
                    bt.Save(path, System.Drawing.Imaging.ImageFormat.Bmp);
                    listView1.Items[flags - 1].SubItems[6].Text = "已轉(zhuǎn)換";
                    tsslPlan.Text = "正在轉(zhuǎn)換" + flags * 100 / path1.Length + "%";
                    if (flags == path1.Length)
                    {
                        toolStrip1.Enabled = true;
                        tsslPlan.Text = "圖片轉(zhuǎn)換全部完成";
                    }

                    flags++;
                }

                break;
            case 1:
                for (int i = 0; i < path1.Length; i++)
                {
                    string ImgName = path1[i].Substring(path1[i].LastIndexOf("\\") + 1,
                        path1[i].Length - path1[i].LastIndexOf("\\") - 1);
                    ImgName = ImgName.Remove(ImgName.LastIndexOf("."));
                    OlePath = path1[i].ToString();
                    bt = new Bitmap(OlePath);
                    path = path2 + "\\" + ImgName + ".jpeg";
                    bt.Save(path, System.Drawing.Imaging.ImageFormat.Jpeg);
                    listView1.Items[flags - 1].SubItems[6].Text = "已轉(zhuǎn)換";
                    tsslPlan.Text = "正在轉(zhuǎn)換" + flags * 100 / path1.Length + "%";
                    if (flags == path1.Length)
                    {
                        toolStrip1.Enabled = true;
                        tsslPlan.Text = "圖片轉(zhuǎn)換全部完成";
                    }

                    flags++;
                }

                break;
            case 2:
                for (int i = 0; i < path1.Length; i++)
                {
                    string ImgName = path1[i].Substring(path1[i].LastIndexOf("\\") + 1,
                        path1[i].Length - path1[i].LastIndexOf("\\") - 1);
                    ImgName = ImgName.Remove(ImgName.LastIndexOf("."));
                    OlePath = path1[i].ToString();
                    bt = new Bitmap(OlePath);
                    path = path2 + "\\" + ImgName + ".png";
                    bt.Save(path, System.Drawing.Imaging.ImageFormat.Png);
                    listView1.Items[flags - 1].SubItems[6].Text = "已轉(zhuǎn)換";
                    tsslPlan.Text = "正在轉(zhuǎn)換" + flags * 100 / path1.Length + "%";
                    if (flags == path1.Length)
                    {
                        toolStrip1.Enabled = true;
                        tsslPlan.Text = "圖片轉(zhuǎn)換全部完成";
                    }

                    flags++;
                }

                break;
            case 3:
                for (int i = 0; i < path1.Length; i++)
                {
                    string ImgName = path1[i].Substring(path1[i].LastIndexOf("\\") + 1,
                        path1[i].Length - path1[i].LastIndexOf("\\") - 1);
                    ImgName = ImgName.Remove(ImgName.LastIndexOf("."));
                    OlePath = path1[i].ToString();
                    bt = new Bitmap(OlePath);
                    path = path2 + "\\" + ImgName + ".gif";
                    bt.Save(path, System.Drawing.Imaging.ImageFormat.Gif);
                    listView1.Items[flags - 1].SubItems[6].Text = "已轉(zhuǎn)換";
                    tsslPlan.Text = "正在轉(zhuǎn)換" + flags * 100 / path1.Length + "%";
                    if (flags == path1.Length)
                    {
                        toolStrip1.Enabled = true;
                        tsslPlan.Text = "圖片轉(zhuǎn)換全部完成";
                    }

                    flags++;
                }

                break;
            default:
                bt.Dispose();
                break;
        }
    }

    private void Form2_FormClosed(object sender, FormClosedEventArgs e) //關(guān)閉窗口時要關(guān)閉線程
    {
        if (td != null) //判斷是否存在線程
        {
            if (td.ThreadState == ThreadState.Running) //然后判斷線程是否正在運(yùn)行
            {
                td.Abort(); //如果運(yùn)行則關(guān)閉線程
            }
        }
    }
}
partial class Form1
{
    /// <summary>
    /// Required designer variable.
    /// </summary>
    private System.ComponentModel.IContainer components = null;

    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
    protected override void Dispose(bool disposing)
    {
        if (disposing && (components != null))
        {
            components.Dispose();
        }
        base.Dispose(disposing);
    }

    #region Windows Form Designer generated code

    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    {
        this.components = new System.ComponentModel.Container();
        System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
        this.toolStrip1 = new System.Windows.Forms.ToolStrip();
        this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel();
        this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();
        this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
        this.toolStripButton4 = new System.Windows.Forms.ToolStripButton();
        this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
        this.toolStripLabel3 = new System.Windows.Forms.ToolStripLabel();
        this.tscbType = new System.Windows.Forms.ToolStripComboBox();
        this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
        this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
        this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
        this.toolStripButton5 = new System.Windows.Forms.ToolStripButton();
        this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
        this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
        this.statusStrip1 = new System.Windows.Forms.StatusStrip();
        this.tsslFileNum = new System.Windows.Forms.ToolStripStatusLabel();
        this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
        this.tsslPlan = new System.Windows.Forms.ToolStripStatusLabel();
        this.listView1 = new System.Windows.Forms.ListView();
        this.columnHeader6 = new System.Windows.Forms.ColumnHeader();
        this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
        this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
        this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
        this.columnHeader4 = new System.Windows.Forms.ColumnHeader();
        this.columnHeader5 = new System.Windows.Forms.ColumnHeader();
        this.columnHeader7 = new System.Windows.Forms.ColumnHeader();
        this.imageList1 = new System.Windows.Forms.ImageList(this.components);
        this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
        this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
        this.toolStrip1.SuspendLayout();
        this.statusStrip1.SuspendLayout();
        this.SuspendLayout();
        // 
        // toolStrip1
        // 
        this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
        this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
        this.toolStripLabel1,
        this.toolStripButton3,
        this.toolStripSeparator1,
        this.toolStripButton4,
        this.toolStripSeparator2,
        this.toolStripLabel3,
        this.tscbType,
        this.toolStripSeparator3,
        this.toolStripButton1,
        this.toolStripSeparator4,
        this.toolStripButton5,
        this.toolStripSeparator5,
        this.toolStripButton2});
        this.toolStrip1.Location = new System.Drawing.Point(0, 0);
        this.toolStrip1.Name = "toolStrip1";
        this.toolStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
        this.toolStrip1.Size = new System.Drawing.Size(536, 25);
        this.toolStrip1.TabIndex = 0;
        this.toolStrip1.Text = "toolStrip1";
        // 
        // toolStripLabel1
        // 
        this.toolStripLabel1.Name = "toolStripLabel1";
        this.toolStripLabel1.Size = new System.Drawing.Size(17, 22);
        this.toolStripLabel1.Text = "  ";
        // 
        // toolStripButton3
        // 
        this.toolStripButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
        this.toolStripButton3.Image = global::PictureBatchConversion.Properties.Resources.打開;
        this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.toolStripButton3.Name = "toolStripButton3";
        this.toolStripButton3.Size = new System.Drawing.Size(23, 22);
        this.toolStripButton3.Text = "toolStripButton3";
        this.toolStripButton3.ToolTipText = "選擇需要轉(zhuǎn)換的圖片";
        this.toolStripButton3.Click += new System.EventHandler(this.toolStripButton3_Click);
        // 
        // toolStripSeparator1
        // 
        this.toolStripSeparator1.Name = "toolStripSeparator1";
        this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
        // 
        // toolStripButton4
        // 
        this.toolStripButton4.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
        this.toolStripButton4.Image = global::PictureBatchConversion.Properties.Resources.圖標(biāo)__29_;
        this.toolStripButton4.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.toolStripButton4.Name = "toolStripButton4";
        this.toolStripButton4.Size = new System.Drawing.Size(23, 22);
        this.toolStripButton4.Text = "toolStripButton4";
        this.toolStripButton4.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
        this.toolStripButton4.ToolTipText = "選擇保存位置";
        this.toolStripButton4.Click += new System.EventHandler(this.toolStripButton4_Click);
        // 
        // toolStripSeparator2
        // 
        this.toolStripSeparator2.Name = "toolStripSeparator2";
        this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
        // 
        // toolStripLabel3
        // 
        this.toolStripLabel3.Name = "toolStripLabel3";
        this.toolStripLabel3.Size = new System.Drawing.Size(65, 22);
        this.toolStripLabel3.Text = "轉(zhuǎn)換格式:";
        // 
        // tscbType
        // 
        this.tscbType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
        this.tscbType.FlatStyle = System.Windows.Forms.FlatStyle.System;
        this.tscbType.Items.AddRange(new object[] {
        "轉(zhuǎn)換為BMP格式",
        "轉(zhuǎn)換為JPG格式",
        "轉(zhuǎn)換為PNG格式",
        "轉(zhuǎn)換為GIF格式"});
        this.tscbType.Name = "tscbType";
        this.tscbType.Size = new System.Drawing.Size(121, 25);
        // 
        // toolStripSeparator3
        // 
        this.toolStripSeparator3.Name = "toolStripSeparator3";
        this.toolStripSeparator3.Size = new System.Drawing.Size(6, 25);
        // 
        // toolStripButton1
        // 
        this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
        this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
        this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.toolStripButton1.Name = "toolStripButton1";
        this.toolStripButton1.Size = new System.Drawing.Size(57, 22);
        this.toolStripButton1.Text = "開始轉(zhuǎn)換";
        this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
        // 
        // toolStripSeparator4
        // 
        this.toolStripSeparator4.Name = "toolStripSeparator4";
        this.toolStripSeparator4.Size = new System.Drawing.Size(6, 25);
        // 
        // toolStripButton5
        // 
        this.toolStripButton5.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
        this.toolStripButton5.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton5.Image")));
        this.toolStripButton5.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.toolStripButton5.Name = "toolStripButton5";
        this.toolStripButton5.Size = new System.Drawing.Size(57, 22);
        this.toolStripButton5.Text = "清空列表";
        this.toolStripButton5.Click += new System.EventHandler(this.toolStripButton5_Click);
        // 
        // toolStripSeparator5
        // 
        this.toolStripSeparator5.Name = "toolStripSeparator5";
        this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25);
        // 
        // toolStripButton2
        // 
        this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
        this.toolStripButton2.Font = new System.Drawing.Font("宋體", 9F);
        this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));
        this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.toolStripButton2.Name = "toolStripButton2";
        this.toolStripButton2.Size = new System.Drawing.Size(33, 22);
        this.toolStripButton2.Text = "關(guān)閉";
        this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click);
        // 
        // statusStrip1
        // 
        this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
        this.tsslFileNum,
        this.toolStripStatusLabel1,
        this.tsslPlan});
        this.statusStrip1.Location = new System.Drawing.Point(0, 321);
        this.statusStrip1.Name = "statusStrip1";
        this.statusStrip1.Size = new System.Drawing.Size(536, 22);
        this.statusStrip1.TabIndex = 1;
        this.statusStrip1.Text = "statusStrip1";
        // 
        // tsslFileNum
        // 
        this.tsslFileNum.Name = "tsslFileNum";
        this.tsslFileNum.Size = new System.Drawing.Size(0, 17);
        // 
        // toolStripStatusLabel1
        // 
        this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
        this.toolStripStatusLabel1.Size = new System.Drawing.Size(23, 17);
        this.toolStripStatusLabel1.Text = "   ";
        // 
        // tsslPlan
        // 
        this.tsslPlan.Name = "tsslPlan";
        this.tsslPlan.Size = new System.Drawing.Size(0, 17);
        // 
        // listView1
        // 
        this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
        this.columnHeader6,
        this.columnHeader1,
        this.columnHeader2,
        this.columnHeader3,
        this.columnHeader4,
        this.columnHeader5,
        this.columnHeader7});
        this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
        this.listView1.Font = new System.Drawing.Font("宋體", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
        this.listView1.FullRowSelect = true;
        this.listView1.GridLines = true;
        this.listView1.Location = new System.Drawing.Point(0, 25);
        this.listView1.Name = "listView1";
        this.listView1.Size = new System.Drawing.Size(536, 296);
        this.listView1.SmallImageList = this.imageList1;
        this.listView1.TabIndex = 2;
        this.listView1.UseCompatibleStateImageBehavior = false;
        this.listView1.View = System.Windows.Forms.View.Details;
        // 
        // columnHeader6
        // 
        this.columnHeader6.Text = "";
        this.columnHeader6.Width = 20;
        // 
        // columnHeader1
        // 
        this.columnHeader1.Text = "文件名";
        this.columnHeader1.Width = 120;
        // 
        // columnHeader2
        // 
        this.columnHeader2.Text = "擴(kuò)展名";
        // 
        // columnHeader3
        // 
        this.columnHeader3.Text = "日期";
        this.columnHeader3.Width = 80;
        // 
        // columnHeader4
        // 
        this.columnHeader4.Text = "路徑";
        this.columnHeader4.Width = 120;
        // 
        // columnHeader5
        // 
        this.columnHeader5.Text = "大小";
        this.columnHeader5.Width = 70;
        // 
        // columnHeader7
        // 
        this.columnHeader7.Text = "狀態(tài)";
        // 
        // imageList1
        // 
        this.imageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
        this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
        this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
        // 
        // openFileDialog1
        // 
        this.openFileDialog1.Filter = "所有圖片|*.jpg;*.jpeg;*.gif;*.bmp;*.png";
        this.openFileDialog1.Multiselect = true;
        // 
        // Form2
        // 
        this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
        this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
        this.ClientSize = new System.Drawing.Size(536, 343);
        this.Controls.Add(this.listView1);
        this.Controls.Add(this.statusStrip1);
        this.Controls.Add(this.toolStrip1);
        this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
        this.MaximizeBox = false;
        this.Name = "Form2";
        this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
        this.Text = "批量圖片格式轉(zhuǎn)換";
        this.Load += new System.EventHandler(this.Form2_Load);
        this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Form2_FormClosed);
        this.toolStrip1.ResumeLayout(false);
        this.toolStrip1.PerformLayout();
        this.statusStrip1.ResumeLayout(false);
        this.statusStrip1.PerformLayout();
        this.ResumeLayout(false);
        this.PerformLayout();

    }

    #endregion

    private System.Windows.Forms.ToolStrip toolStrip1;
    private System.Windows.Forms.StatusStrip statusStrip1;
    private System.Windows.Forms.ListView listView1;
    private System.Windows.Forms.ToolStripLabel toolStripLabel1;
    private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
    private System.Windows.Forms.ToolStripLabel toolStripLabel3;
    private System.Windows.Forms.ToolStripComboBox tscbType;
    private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
    private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
    private System.Windows.Forms.ToolStripButton toolStripButton1;
    private System.Windows.Forms.ToolStripButton toolStripButton2;
    private System.Windows.Forms.ColumnHeader columnHeader1;
    private System.Windows.Forms.ColumnHeader columnHeader2;
    private System.Windows.Forms.ColumnHeader columnHeader3;
    private System.Windows.Forms.ColumnHeader columnHeader4;
    private System.Windows.Forms.ColumnHeader columnHeader5;
    private System.Windows.Forms.OpenFileDialog openFileDialog1;
    private System.Windows.Forms.ToolStripButton toolStripButton3;
    private System.Windows.Forms.ToolStripButton toolStripButton4;
    private System.Windows.Forms.ColumnHeader columnHeader6;
    private System.Windows.Forms.ImageList imageList1;
    private System.Windows.Forms.ToolStripStatusLabel tsslFileNum;
    private System.Windows.Forms.ToolStripButton toolStripButton5;
    private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
    private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
    private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
    private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
    private System.Windows.Forms.ToolStripStatusLabel tsslPlan;
    private System.Windows.Forms.ColumnHeader columnHeader7;
}

以上就是利用C#實(shí)現(xiàn)批量圖片格式轉(zhuǎn)換功能的詳細(xì)內(nèi)容,更多關(guān)于C#圖片格式轉(zhuǎn)換的資料請關(guān)注腳本之家其它相關(guān)文章!

相關(guān)文章

  • C#如何給新建的winform程序添加資源文件夾Resources

    C#如何給新建的winform程序添加資源文件夾Resources

    這篇文章主要介紹了C#如何給新建的winform程序添加資源文件夾Resources,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教
    2022-09-09
  • C#實(shí)現(xiàn)IP攝像頭的方法

    C#實(shí)現(xiàn)IP攝像頭的方法

    這篇文章主要介紹了C#實(shí)現(xiàn)IP攝像頭的方法,涉及C#IP連接與攝像頭視頻錄像的相關(guān)技巧,需要的朋友可以參考下
    2015-04-04
  • C#導(dǎo)出生成excel文件的方法小結(jié)(xml,html方式)

    C#導(dǎo)出生成excel文件的方法小結(jié)(xml,html方式)

    C#導(dǎo)出生成excel文件的方法小結(jié)(xml,html方式)。需要的朋友可以過來參考下,希望對大家有所幫助
    2013-10-10
  • C# WPF實(shí)現(xiàn)讀寫CAN數(shù)據(jù)

    C# WPF實(shí)現(xiàn)讀寫CAN數(shù)據(jù)

    這篇文章主要介紹了C# WPF實(shí)現(xiàn)讀寫CAN數(shù)據(jù),文中通過代碼示例給大家講解的非常詳細(xì),對大家的學(xué)習(xí)或工作有一定的幫助,需要的朋友可以參考下
    2024-06-06
  • C#定義的MP3播放類實(shí)例

    C#定義的MP3播放類實(shí)例

    這篇文章主要介紹了C#定義的MP3播放類,實(shí)例分析了C#操作多媒體音頻文件的技巧,具有一定參考借鑒價值,需要的朋友可以參考下
    2015-04-04
  • C#向Word插入排版精良的TextBox

    C#向Word插入排版精良的TextBox

    這篇文章主要為大家詳細(xì)介紹了C#向Word插入排版精良的Text Box的相關(guān)方法,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2016-09-09
  • C#處理TCP數(shù)據(jù)的方法詳解

    C#處理TCP數(shù)據(jù)的方法詳解

    Tcp是一個面向連接的流數(shù)據(jù)傳輸協(xié)議,用人話說就是傳輸是一個已經(jīng)建立好連接的管道,數(shù)據(jù)都在管道里像流水一樣流淌到對端,那么數(shù)據(jù)必然存在幾個問題,比如數(shù)據(jù)如何持續(xù)的讀取,數(shù)據(jù)包的邊界等,本文給大家介紹了C#處理TCP數(shù)據(jù)的方法,需要的朋友可以參考下
    2024-06-06
  • DevExpress之ChartControl實(shí)現(xiàn)餅狀圖百分比演示實(shí)例

    DevExpress之ChartControl實(shí)現(xiàn)餅狀圖百分比演示實(shí)例

    這篇文章主要介紹了DevExpress之ChartControl實(shí)現(xiàn)餅狀圖百分比演示的方法,實(shí)例講述了窗體與圖形繪制函數(shù)的用法,需要的朋友可以參考下
    2014-10-10
  • c# 線性回歸和多項(xiàng)式擬合示例詳解

    c# 線性回歸和多項(xiàng)式擬合示例詳解

    線性回歸與多項(xiàng)式擬合是兩種常用的回歸分析方法,線性回歸模型簡單,易于計(jì)算,但只適用于線性關(guān)系的數(shù)據(jù),多項(xiàng)式擬合能處理非線性數(shù)據(jù),模型更復(fù)雜,擬合度更高,但容易產(chǎn)生過擬合問題,計(jì)算成本較高,適用場景不同,線性回歸適合線性數(shù)據(jù),多項(xiàng)式擬合適合非線性數(shù)據(jù)
    2024-10-10
  • 深入C#中使用SqlDbType.Xml類型參數(shù)的使用詳解

    深入C#中使用SqlDbType.Xml類型參數(shù)的使用詳解

    本篇文章是對在C#中使用SqlDbType.Xml類型參數(shù)的使用進(jìn)行了詳細(xì)的分析介紹,需要的朋友參考下
    2013-05-05

最新評論