.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

watermark logo for web-page using ASP.Net

Posted By: susant     Posted Date: February 15, 2009    Points:2   Category :ASP.Net
Hi frnds

I want to show the company LOGO as watermark inside my web-page..


Author: Rahul             
Posted Date: February 15, 2009     Points: 5   

Hi Susant,
Yes it is possible to create watermark on image using c# check out this code to create watermark on image dynamically

System.Drawing.Image objImage = System.Drawing.Image.FromFile(Server.MapPath("youImage.jpg"));

int height = objImage.Height;
int width = objImage.Width;

System.Drawing.Bitmap bitmapimage = new System.Drawing.Bitmap(objImage, width, height);

System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bitmapimage);

SolidBrush brush = new SolidBrush(Color.FromArgb(113, 255, 255, 255));

//Adding watermark text on image
g.DrawString("Yor water mark text", new Font("Arial", 18, System.Drawing.FontStyle.Bold), brush, 0, 100);

Response.ContentType = "image/jpeg";
bitmapimage.Save(Response.OutputStream, ImageFormat.Jpeg);

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend