I draw text on image (i use image map) but when the image display, the web template and image source is lost, web only display image with difference image src
<asp:imageMap id='imageMap1" runnat="server" imageUrl="~images/g1.jpg"></asp:imageMap>
private void drawText()
{
string path = Server.MapPath(ImageMap1.ImageUrl);
Bitmap bitmap = new Bitmap(path);
Graphics graphic = Graphics.FromImage(bitmap);
graphic.SmoothingMode = SmoothingMode.AntiAlias;
graphic.DrawString("100", new Font("Arial", 3), SystemBrushes.WindowText, new Point(370, 70));Response.ContentType = "image/jpeg";
string path1 = "~/images/temp/" + Path.GetFileName(Server.MapPath(ImageMap1.ImageUrl));
bitmap.Save(Server.MapPath(path1));
ImageMap1.ImageUrl = Server.MapPath(path1);
//Clean house.
graphic.Dispose();
bitmap.Dispose();
}
Go to the complete details ...