How to create watermark image at runtime in c#? I dont want any unnecessary codes, i want easy, clear and short block of code if possible.
Thanks in advance.
I like simplicity :
protected void Page_Load(object sender, EventArgs e)
string s = Server.MapPath("original.jpg");
string s2 = Server.MapPath("ikon.gif");
System.Drawing.Image original= Bitmap.FromFile(s);
Graphics gra = Graphics.FromImage(original);
Bitmap logo = new Bitmap(s2);
gra.DrawImage(logo, new Point(70, 70));
Response.ContentType = "image/JPEG";
do you know what the performance costs are of running watermarking at runtime compared to saving the image, and just displaying the image?
I dont even care man :) we cache the images in the hard drive, the image loader checks if image exists, if not, it creates. So it works only one time for one image for resizing and marking issues. :)