private void button1_Click(object sender, EventArgs e)
 {
     if (comboBox1.Text == "proposed method")
     {
         double lamda1 = double.Parse(textBox1.Text);
         double lamda2 = double.Parse(textBox2.Text);
         double lamda3 = double.Parse(textBox3.Text);
         double Gamma  = double.Parse(textBox4.Text);
         double M      = double.Parse(textBox5.Text);
         double Xzero  = double.Parse(textBox6.Text);
         double Yzero  = double.Parse(textBox7.Text);
         double Zzero  = double.Parse(textBox8.Text);
         steg = new steganograph(lamda1, lamda2, lamda3, Xzero, Yzero, Zzero, Gamma, M, coverheight, coverwidth);
         //int[] input = new int[3 * secwidth * secheight + 2];
         int[] input    = new int[secwidth * secheight + 2];
         int   ind      = 2;
         int   capacity = coverheight * coverwidth / 8;
         input[0] = secheight;
         input[1] = secwidth;
         for (int ii = 0; ii < secwidth; ii++)
         {
             for (int jj = 0; jj < secheight; jj++)
             {
                 input[ind++] = Convert.ToInt32(pixel2[ii, jj].R);
             }
         }
         int before = ind;
         //for (int ii = 0; ii < secwidth; ii++)
         //    for (int jj = 0; jj < secheight; jj++)
         //        input[ind++] = Convert.ToInt32(pixel2[ii, jj].G);
         //for (int ii = 0; ii < secwidth; ii++)
         //    for (int jj = 0; jj < secheight; jj++)
         //        input[ind++] = Convert.ToInt32(pixel2[ii, jj].B);
         //steg.save_pixels(input, 2, "im.txt", input.Length);
         int[] binary_data = steg.binary_maker(input);
         int   count       = 0;
         if (binary_data.Length > 9 * (coverwidth * coverheight))
         {
             throw new Exception("سايز عكس ورودي بزرگ است!");
         }
         else
         {
             color combine_color = convertor(pixel);
             int[,] altered_red   = steg.stegno(combine_color.red, binary_data, ref count, 1);
             int[,] altered_green = (int[, ])combine_color.green.Clone();
             int[,] altered_blue  = (int[, ])combine_color.blue.Clone();
             if (binary_data.Length > (coverwidth * coverheight))
             {
                 altered_green = steg.stegno(combine_color.green, binary_data, ref count, 1);
             }
             if (binary_data.Length > 2 * (coverwidth * coverheight))
             {
                 altered_blue = steg.stegno(combine_color.blue, binary_data, ref count, 1);
             }
             if (binary_data.Length > 3 * (coverwidth * coverheight))
             {
                 altered_red = steg.stegno(altered_red, binary_data, ref count, 2);
             }
             if (binary_data.Length > 4 * (coverwidth * coverheight))
             {
                 altered_green = steg.stegno(altered_green, binary_data, ref count, 2);
             }
             if (binary_data.Length > 5 * (coverwidth * coverheight))
             {
                 altered_blue = steg.stegno(altered_blue, binary_data, ref count, 2);
             }
             if (binary_data.Length > 6 * (coverwidth * coverheight))
             {
                 altered_red = steg.stegno(altered_red, binary_data, ref count, 4);
             }
             if (binary_data.Length > 7 * (coverwidth * coverheight))
             {
                 altered_green = steg.stegno(altered_green, binary_data, ref count, 4);
             }
             if (binary_data.Length > 8 * (coverwidth * coverheight))
             {
                 altered_blue = steg.stegno(altered_blue, binary_data, ref count, 4);
             }
             Bitmap image_save = new Bitmap(coverwidth, coverheight, PixelFormat.Format24bppRgb);
             for (int ii = 0; ii < coverwidth; ii++)
             {
                 for (int jj = 0; jj < coverheight; jj++)
                 {
                     Color temp = Color.FromArgb(altered_red[ii, jj], altered_green[ii, jj], altered_blue[ii, jj]);
                     image_save.SetPixel(ii, jj, temp);
                 }
             }
             SaveFileDialog save = new SaveFileDialog();
             save.Filter = "Bitmap file(*.bmp)|*.bmp|Jpeg File(*.jpg)|*.jpg|PNG File(*.png)|*.png|TIFF File(*.tif)|*.tiff";
             DialogResult dr = save.ShowDialog();
             pictureBox1.Image = image_save;
             if (dr.Equals(DialogResult.OK))
             {
                 filesave1 = save.FileName;
             }
             ////ImageCodecInfo bmpCodec = FindEncoder(ImageFormat.Bmp);
             //EncoderParameters parameters = new EncoderParameters();
             //parameters.Param[0] = new EncoderParameter(Encoder.ColorDepth, 24);
             image_save.Save(filesave1, ImageFormat.Bmp);
         }
     }
     else if (comboBox1.Text == "Yu method")
     {
     }
 }