Save Text as Image
-
Hello Friends, I am Developing an C#.NET windows application in this i require to save text written on textbox or label as a image it may be in any format like JPG, BMP. Means whatever text written in textbox will as it is in image format.
1.) Create a Bitmap with the dimension of your output-control. 2.) Create a Graphics-object for this bitmap 3.) Use the Graphics-object, the font of your control and the text of this control to render the text to the Graphics-object via it's DrawString method. 4.) Use the .Save Method of the Bitmap to save it to the desired image file
-
1.) Create a Bitmap with the dimension of your output-control. 2.) Create a Graphics-object for this bitmap 3.) Use the Graphics-object, the font of your control and the text of this control to render the text to the Graphics-object via it's DrawString method. 4.) Use the .Save Method of the Bitmap to save it to the desired image file