I'm creating app like snapchat
.How to add text on image like snapchat text.
Like
Here is my code :
private void button1_Click(object sender, EventArgs e)
{
FileStream fs = new FileStream(@"path\images.png", FileMode.Open, FileAccess.Read);
Image image = Image.FromStream(fs);
SolidBrush drawBrush = new SolidBrush(Color.Black);
fs.Close();
Bitmap b = new Bitmap(image);
Graphics graphics = Graphics.FromImage(b);
graphics.FillRectangle(Brushes.Red, new Rectangle(10, 10, 2, 2));
graphics.DrawString("Hello", this.Font, Brushes.Red, 100, 100);
b.Save(@"path\images.png", image.RawFormat);
image.Dispose();
b.Dispose();
}
Text write on the image working fine but i don't know to write text on image like snapchat.I have idea like first calcualte the string size then set background color of string and opacity etc.But I don't know how,please help me thank you.