Creating images in .Net is not a big task.This can be done using a bitmap object & graphics object. Using thease objcts we can create our own images or any graphicle objects.
Public Void CreateImage()
{
System.Drawing.Bitmap objBMP = new System.Drawing.Bitmap(1500, 600);
System.Drawing.Graphics objGraph = System.Drawing.Graphics.FromImage(objBMP);
objGraph.Clear(System.Drawing.Color.Gray);
objGraph.DrawString("Hello Anil.", new System.Drawing.Font("Courier", 10), Brushes.Green, 70, 90);
objBMP.Save("D:\\Anil\\Sample.bmp", System.Drawing.Imaging.ImageFormat.Bmp); //Please provide your path here tp save the image
}
{
System.Drawing.Bitmap objBMP = new System.Drawing.Bitmap(1500, 600);
System.Drawing.Graphics objGraph = System.Drawing.Graphics.FromImage(objBMP);
objGraph.Clear(System.Drawing.Color.Gray);
objGraph.DrawString("Hello Anil.", new System.Drawing.Font("Courier", 10), Brushes.Green, 70, 90);
objBMP.Save("D:\\Anil\\Sample.bmp", System.Drawing.Imaging.ImageFormat.Bmp); //Please provide your path here tp save the image
}
Happy Coding!!!!!!!!
ThanksAnil Kumar PandeySystem ArchitectGreen Point Technology (India) Ltd.Mumbai, Maharshtra
No comments:
Post a Comment