frmSpecialEfficacy.cs

(开头部分) 8KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Imaging;
namespace PictureManage
{
    public partial class frmSpecialEfficacy : Form
    {
        public frmSpecialEfficacy()
        {
            InitializeComponent();
        }
        public Image ig;
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void frmSpecialEfficacy_Load(object sender, EventArgs e)
        {
            pictureBox1.Image = ig;
            pictureBox2.Image = ig;
        }

        private void tscbXG_SelectedIndexChanged(object sender, EventArgs e)
        {
            pictureBox2.Image = ig;
            string Ttype = tscbXG.Text.Trim();
            switch(Ttype)
            {

                case "浮雕":

                    try
                    {
                        Bitmap myBitmap;
                        Image myImage = pictureBox2.Image;
                        myBitmap = new Bitmap(myImage);
                        for (int i = 0; i < myBitmap.Width - 1; i++)
                        {
                            for (int j = 0; j < myBitmap.Height - 1; j++)
                            {
                                Color Color1 = myBitmap.GetPixel(i, j);
                                Color Color2 = myBitmap.GetPixel(i + 1, j + 1);
                                int red = Math.Abs(Color1.R - Color2.R + 128);
                                int green = Math.Abs(Color1.G - Color2.G + 128);
                                int blue = Math.Abs(Color1.B - Color2.B + 128);
                                //颜色处理
                                if (red > 255) red = 255;
                                if (red < 0) red = 0;

                                if (green > 255) green = 255;
                                if (green < 0) green = 0;

                                if (blue > 255) blue = 255;
                                if (blue < 0) blue = 0;
后面还有 140 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。