Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Convert Text to Image (Automated)

Posted on 2010-11-10
3
Medium Priority
?
498 Views
Last Modified: 2012-05-10
Basically I have a list of a few hundred telephone numbers. I am wanting to create an image for each number without having to open paint and type the number then hit save a bunch of times. Is there a way to either

a) do this inside of excel?

b) use asp.net to accomplish this

c) use c# to accomplish this?

Thanks in advance for the help!
0
Comment
Question by:DotNetChano
3 Comments
 
LVL 32

Accepted Solution

by:
Erick37 earned 2000 total points
ID: 34102726
This should get you started.
Creates a bitmap, draws text, saves to file.

            private void button1_Click(object sender, EventArgs e)
            {
                  string s = "Test String";
                  Bitmap bmp = new Bitmap(100, 50);
                  Graphics g = Graphics.FromImage(bmp);
                  g.FillRectangle(Brushes.Black , 0, 0, bmp.Width,bmp.Height);
                  g.DrawString(s, new Font("Tahoma", 12), Brushes.White, new PointF(0, 0));
                  bmp.Save("c:\\test22.png",ImageFormat.Png);
                  g.Dispose();
                  bmp.Dispose();
            }
0
 
LVL 4

Author Closing Comment

by:DotNetChano
ID: 34103149
Thanks!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question