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!"); } }
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); } }