Adsence750x90

Sunday, June 22, 2008

Dynamically Add Watermark On Image in ASP.Net - sample code for add runtime watermark

Dynamically Add Watermark On Image ASP.NET C#
How to create watermark on image. you can simply create watermarks text on image
//used namespaces

//using System.IO;
//using System.Drawing.Drawing2D;
//using System.Drawing;
//using System.Drawing.Imaging;

///Locate Image from Image folder.
System.Drawing.Image objImage = System.Drawing.Image.FromFile(Server.MapPath("images/Copy.jpg"));
//Taken Actual width anf height From Image
int height = objImage.Height;//height
int width = objImage.Width;//Width
//Create a Bitmap Image
System.Drawing.Bitmap bitmapimage = new System.Drawing.Bitmap(objImage, width, height);// create bitmap with same size of Actual image
//Convert in to a Graphics object
System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bitmapimage);
//Creating Brushe
System.Drawing.SolidBrush brush = new System.Drawing.SolidBrush(System.Drawing.Color.FromArgb(113, 255, 255, 255));
g.DrawString("Raju.M C# Programmer Kerala,India.Dynamic WaterMark sample", new Font("Arial", 18, System.Drawing.FontStyle.Bold), brush, 0, 100);
Response.ContentType = "image/jpeg";//setting ContentType
bitmapimage.Save(Response.OutputStream, ImageFormat.Jpeg);//save image with dynamic watermark
Download Source

Friday, June 20, 2008

Creating runtime watermark on image using C# and ASP.NET

Creating watermark on image using C# and ASP.NET

C# Code
//Creating image with watermark
//using System.IO;
//using System.Drawing.Drawing2D;
//using System.Drawing.Imaging;
System.Drawing.Image objImage = System.Drawing.Image.FromFile(Server.MapPath("image.jpg"));//From File
int height = objImage.Height;//Actual image width
int width = objImage.Width;//Actual image height
System.Drawing.Bitmap bitmapimage = new System.Drawing.Bitmap(objImage, width, height);// create bitmap with same size of Actual image
System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bitmapimage);
//Creates a System.Drawing.Color structure from the four ARGB component
//(alpha, red, green, and blue) values. Although this method allows a 32-bit value
// to be passed for each component, the value of each component is limited to 8 bits.
//create Brush
SolidBrush brush = new SolidBrush(Color.FromArgb(113, 255, 255, 255));
//Adding watermark text on image
g.DrawString("Raju.M C# Programmer India @ WaterMark sample", new Font("Arial", 18, FontStyle.Bold), brush,100, 100);
//save image with Watermark image/picture
bitmapimage.Save("watermark-image.jpg");
Download Source

How to configure Silverlight on visual studio 2005

How to configure Silverlight on visual studio 2005
i search how to configure Silverlight on VS 2005 in google, but i did not get the correct information.
finally i get an article from
http://blogs.sqlxml.org/bryantlikes/archive/2007/05/02/silverlight-hello-world-in-c-from-vs-2005.aspx
(bryantlikes) he give me the right idea about Silverlight and aslo from
http://silverlight.net/forums/p/2332/6074.aspx
This two artilce help me to Configure or integrate Silverlight in my VS 2005. Thank you mister bryantlikes and Yasser Makram.

Friday, June 6, 2008

Any one want Integration Code or HELP for Authorize.net with ASP.NET -SIM Methord

Any one want Integration Code or HELP for Authorize.net with ASP.NET -SIM Methord

if u want any help in Payment Integration with Authorize.NET and ASP.NET Please Inform me. i will solve your problem.you just post a comment or send me private email to

raju.rajum@gmail.com
or
raju.m@live.com.

How to Change ASP.Net Calendar Control to show Next Month

if we place a Calendar Control in ASP.NET page, its Shows current month and date.Then how can we set that month in to next month?, its possible to set current month to next month, the following c# code that change this month problem.

C# ASP.NET code to Change to set month vale to next month

DateTime nextMonth = DateTime.Now.AddMonths(1);
Calendar1.TodaysDate = nextMonth;
DateTime nextOfNextMonth = DateTime.Now.AddMonths(2);
Calendar2.TodaysDate = nextOfNextMonth;