コード例 #1
0
        private void button5_Click(object sender, EventArgs e)
        {
            Bitmap srcm;

            pictureBox1.Image = ToolFunctions.GetThumbnail((Bitmap)bitmap.Clone(), pictureBox1.Height, pictureBox1.Width) as Image;
            ProcessFunctions.Hsl_Change("s", -5, bitmap, out srcm);
            pictureBox2.Image = ToolFunctions.GetThumbnail((Bitmap)srcm.Clone(), pictureBox1.Height, pictureBox1.Width) as Image;
            Color c  = Color.FromArgb(15, 40, 200);
            Color c2 = ProcessFunctions.Hsl_Pixel_Change(c, "h", 24);

            //Console.WriteLine(hue + "," + sa + "," + l);
            Console.WriteLine(c.R + "," + c.G + "," + c.B + " ; " + c2.R + "," + c2.G + "," + c2.B);
            //pictureBox3.BackColor = Color.FromArgb(258, 2, -1);
        }
コード例 #2
0
        private void Hsi_H_ValueChanged(object sender, EventArgs e)
        {
            TrackBar self = (TrackBar)sender;
            Bitmap   dbitmap;

            HV = self.Value;
            if (1 == HSI_FLAG)
            {
                ProcessFunctions.Hsl_Change("h", HV, (Bitmap)Hsi_tempBmp.Clone(), out dbitmap);
            }
            else
            {
                Bitmap dbitmap1;
                ProcessFunctions.Hsl_Change("l", IV, (Bitmap)Hsi_bitmap.Clone(), out dbitmap1);
                Bitmap dbitmap2;
                ProcessFunctions.Hsl_Change("S", SV, (Bitmap)dbitmap1.Clone(), out dbitmap2);
                Hsi_tempBmp = dbitmap2;
                ProcessFunctions.Hsl_Change("h", HV, (Bitmap)Hsi_tempBmp.Clone(), out dbitmap);
            }
            this.pictureBox_WorkPlace.Image = ToolFunctions.GetThumbnail((Bitmap)dbitmap.Clone(), pictureBox_WorkPlace.Height, pictureBox_WorkPlace.Width) as Image;
            Hsi_nowBmp = dbitmap;
        }