Ejemplo n.º 1
0
        private void btnEgme_Click(object sender, EventArgs e)
        {
            try
            {
                Bitmap input_img = new Bitmap(pictureBox1.Image);
                int    width     = input_img.Width;
                int    height    = input_img.Height;
                int    sh        = Convert.ToInt32(textBox1.Text);
                double aci       = sh * 2 * Math.PI / 360;
                output_img = new Bitmap(width, height + sh);
                int x2, y2;

                for (int x1 = 0; x1 < width; x1++)
                {
                    for (int y1 = 0; y1 < height; y1++)
                    {
                        x2 = x1;
                        y2 = Convert.ToInt32(aci * x1 + y1);
                        if (x2 >= 0 && x2 < width && y2 >= 0 && y2 < height + sh)
                        {
                            R = input_img.GetPixel(x1, y1).R;
                            G = input_img.GetPixel(x1, y1).G;
                            B = input_img.GetPixel(x1, y1).B;
                            output_img.SetPixel(x2, y2, Color.FromArgb(R, G, B));
                        }
                    }
                }
                pictureBox2.Image = ImageFunction.zoomOut(output_img);
            }
            catch
            {
                MessageBox.Show("Lütfen Fotoğraf Seçiniz veya Girdiğiniz Değerleri Kontrol Ediniz!");
            }
        }
Ejemplo n.º 2
0
 private void zoomOutİşlemiToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (gecici == null)
     {
         MessageBox.Show("Lütfen Resim Yükleyiniz !!");
     }
     else
     {
         pictureBox2.Image = ImageFunction.zoomOut(gecici);
     }
 }
Ejemplo n.º 3
0
 private void zoomInİşlemiToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (temp == null)
     {
         MessageBox.Show("Lütfen Resim Yükleyiniz !!");
     }
     else
     {
         pictureBox2.Image = ImageFunction.zoomIn(temp, temp.Width, temp.Height);
     }
 }
Ejemplo n.º 4
0
 private void histogramEşitlemeToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (histogramTemp == null)
     {
         MessageBox.Show("Lütfen Resim Yükleyiniz !!");
     }
     else
     {
         pictureBox2.Image = ImageFunction.histogramEsitleme(histogramTemp);
     }
 }
Ejemplo n.º 5
0
 private void küçükToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     if (kucukOlcekTemp == null)
     {
         MessageBox.Show("Lütfen Resim Yükleyiniz !!");
     }
     else
     {
         pictureBox2.Image = ImageFunction.kucukOlcekleme(kucukOlcekTemp);
     }
 }
Ejemplo n.º 6
0
 private void resminNegatifiniAlmaToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (yedek == null)
     {
         MessageBox.Show("Lütfen Resim Yükleyiniz !!");
     }
     else
     {
         pictureBox2.Image = ImageFunction.ResminNegatifi(yedek);
     }
 }
Ejemplo n.º 7
0
 private void sobelFiltresiToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     if (sobelTemp == null)
     {
         MessageBox.Show("Lütfen Resim Yükleyiniz !!");
     }
     else
     {
         pictureBox2.Image = ImageFunction.SobelFilter(sobelTemp);
     }
 }
Ejemplo n.º 8
0
 private void logaritmaDönüşümleriToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (logTemp == null)
     {
         MessageBox.Show("Lütfen Resim Yükleyiniz !!");
     }
     else
     {
         pictureBox2.Image = ImageFunction.LogritmaDonusum(logTemp, 100);
     }
 }
Ejemplo n.º 9
0
 private void kuvvetGamaDönüşümleriToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (gamaTemp == null)
     {
         MessageBox.Show("Lütfen Resim Yükleyiniz !!");
     }
     else
     {
         pictureBox2.Image = ImageFunction.GammaDonusum(gamaTemp, 3.0);
     }
 }
Ejemplo n.º 10
0
 private void kontrastGenişletmeToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     if (kontrantTemp == null)
     {
         MessageBox.Show("Lütfen Resim Yükleyiniz !!");
     }
     else
     {
         pictureBox2.Image = ImageFunction.Kontrant(kontrantTemp, 255);
     }
 }
Ejemplo n.º 11
0
 private void yuzYetmisDereceDondurmetoolStripMenuItem5_Click(object sender, EventArgs e)
 {
     if (ikiYuzYetmisTemp == null)
     {
         MessageBox.Show("Lütfen Resim Yükleyiniz !!");
     }
     else
     {
         pictureBox2.Image = ImageFunction.ikiYuzYetmisDereceDondurme(ikiYuzYetmisTemp);
     }
 }
Ejemplo n.º 12
0
 private void doksanDereceDondurmetoolStripMenuItem3_Click(object sender, EventArgs e)
 {
     if (doksanTemp == null)
     {
         MessageBox.Show("Lütfen Resim Yükleyiniz !!");
     }
     else
     {
         pictureBox2.Image = ImageFunction.doksanDereceDondurme(doksanTemp);
     }
 }
Ejemplo n.º 13
0
 private void resmiSiyahBeyazaDonusturmeToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (bitmap == null)
     {
         MessageBox.Show("Lütfen Resim Yükleyiniz !!");
     }
     else
     {
         pictureBox2.Image = ImageFunction.SiyahBeyazaDonusur(bitmap);
     }
 }
Ejemplo n.º 14
0
 private void prewittFiltresiToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     if (prewittTemp == null)
     {
         MessageBox.Show("Lütfen Resim Yükleyiniz !!");
     }
     else
     {
         pictureBox2.Image = ImageFunction.prewittKenarBulma(prewittTemp);
     }
 }
Ejemplo n.º 15
0
 private void resmiGriTonaDönüştürmeToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (tmp == null)
     {
         MessageBox.Show("Lütfen Resim Yükleyiniz !!");
     }
     else
     {
         pictureBox2.Image = ImageFunction.griton(tmp);
     }
 }
Ejemplo n.º 16
0
        private void birResimdenDiğerininÇıkarmasıToolStripMenuItem_Click(object sender, EventArgs e)
        {
            pictureBox2.Image = null;
            bitmapRefresh();

            using (OpenFileDialog dlg = new OpenFileDialog())
            {
                dlg.Title  = "Open Image";
                dlg.Filter = "Image files (*.jpg, *.png, *bmp) | *.jpg; *.png; *.bmp";

                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    ikinciPict = new Bitmap(dlg.FileName);
                }

                if (ikinciPict != null)
                {
                    bitmap            = new Bitmap(bitmap, pictureBox1.ClientSize.Width, pictureBox1.ClientSize.Height);
                    ikinciPict        = new Bitmap(ikinciPict, pictureBox1.ClientSize.Width, pictureBox1.ClientSize.Height);
                    pictureBox2.Image = null;


                    Bitmap bmp = new Bitmap(bitmap, pictureBox1.Width - 2, pictureBox1.Height - 2);

                    int nOp = (int)Enum.GetValues(typeof(ImageFunction.BlendOperation)).GetValue(1);
                    try
                    {
                        ImageFunction.BlendImages(bmp, 0, 0, bmp.Width, bmp.Height, ikinciPict, 0, 0, (ImageFunction.BlendOperation)nOp);
                    }
                    catch (Exception exception)
                    {
                        MessageBox.Show(exception.ToString());
                    }

                    pictureBox2.Image = new Bitmap(bmp, pictureBox2.ClientSize.Width, pictureBox2.ClientSize.Height);
                }
            }
        }
Ejemplo n.º 17
0
        public static Bitmap ikiYuzYetmisDereceDondurme(Bitmap bitmap)
        {
            Bitmap bmp = ImageFunction.resmiDondur(bitmap, 270, true, true, Color.White);

            return(bmp);
        }
Ejemplo n.º 18
0
        public static Bitmap yuzSeksenDereceDondurme(Bitmap bitmap)
        {
            Bitmap bmp = ImageFunction.resmiDondur(bitmap, 180, true, true, Color.White);

            return(bmp);
        }
Ejemplo n.º 19
0
        public static Bitmap kirkBesDereceDondurme(Bitmap img)
        {
            Bitmap bmp = ImageFunction.resmiDondur(img, 45, true, true, Color.White);

            return(bmp);
        }
Ejemplo n.º 20
0
        public static Bitmap kucukOlcekleme(Bitmap gecici)
        {
            Bitmap BMP = ImageFunction.goruntuBoyutlandırma(gecici.Width, gecici.Height / 2, gecici);

            return(BMP);
        }
Ejemplo n.º 21
0
        public static Bitmap ortaOlcekleme(Bitmap temp)
        {
            Bitmap BMP = ImageFunction.goruntuBoyutlandırma(temp.Width * 1, temp.Height * 1, temp);

            return(BMP);
        }
Ejemplo n.º 22
0
        public static Bitmap buyukOlcekleme(Bitmap bitmap)
        {
            Bitmap BMP = ImageFunction.goruntuBoyutlandırma(bitmap.Width * 2, bitmap.Height * 2, bitmap);

            return(BMP);
        }