Solved

Convert Text to Image (Automated)

Posted on 2010-11-10
3
493 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 7

Expert Comment

by:JosephEricDavis
ID: 34102678
0
 
LVL 32

Accepted Solution

by:
Erick37 earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

911 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now