Click here to Skip to main content
16,019,018 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to write on image when sending mail.I user ckeditor for this but in ckeditor
i can insert image but not write any text on image.

any one help me for my problem.is it possible or not if possible how is it.

What I have tried:

I tried ckeditor for my upload image and text.
Posted
Updated 28-Oct-17 23:52pm

1 solution

If you have the image on your server - and if it's accessible from C# code it is - then it's simple:
using (Image im = Bitmap.FromFile(Path.Combine(imagesPath, "MyPic.jpg")))
    {
    using (Graphics g = Graphics.FromImage(im))
        {
        g.DrawString("HELLO!", myFont, myBrush, xLocation, yLocation);
        im.Save(Path.Combine(imagesPath, "MyPicWrittenOn.jpg", ImageFormat.Jpeg));
        }
    }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900