Fotoğrafın üstüne yazı yazma – C#

Fotoğrafın üstüne yazı yazma

[code lang=”csharp”]

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;

namespace ResimYazı

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}

Color renk;

private void button1_Click(object sender, EventArgs e)

{

colorDialog1.ShowDialog();

renk = colorDialog1.Color;

}

string dosyaYolu;

private void button2_Click(object sender, EventArgs e)

{

openFileDialog1.ShowDialog();

dosyaYolu = openFileDialog1.FileName;

}

Bitmap bmp;

private void button4_Click(object sender, EventArgs e)

{

if (renk != null && comboBox1.Text != "")

{

bmp = new Bitmap(dosyaYolu);

Graphics g = Graphics.FromImage(bmp);

g.DrawString(textBox1.Text, new Font("Verdava", Convert.ToInt32(comboBox1.Text),

FontStyle.Regular), new SolidBrush(renk), 10, 10);

pictureBox1.Image = bmp;

}

}

private void button3_Click(object sender, EventArgs e)

{

saveFileDialog1.Filter = "(*.jpg)|*.jpg";

saveFileDialog1.ShowDialog();

bmp.Save(saveFileDialog1.FileName);

}

private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)

{

System.Diagnostics.Process.Start("www.facebook.com/ferhatszer");

}

}

}

[/code]

Sorularınız için www.facebook.com/ferhatszer

Projeyi indir

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir