Add text to png file.

I have 5 png image files, each is a different color of a simple balloon map marker.  I'd like be able to dynamically insert/edit/add a number to each.    The numbers could be from 1 to 250.  So, with 5 colors, I would need 1250 png file to cover all combinations of colors/numbers.  I'd like to use the 5 colored png files, and then dynamically insert a number, centered within the ballon.

I'm using the Google maps javascript v3 API, and map marker.   Unless maybe there is a way using the API to add numbers to a png file that is used as a map marker?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kyle AbrahamsSenior .Net DeveloperCommented:
I converted this to vb.Net on the fly from:

Adjusting for a dynamic width / height of the images.

Dim strFormat  as StringFormat = new StringFormat();
strFormat.Alignment = StringAlignment.Center
strFormat.LineAlignment = StringAlignment.Center

Dim myBmp as Bitmap = new Bitmap("C:\\myImage.png")
Dim g as Graphics = Graphics.FromImage(myBmp)
Dim i as Integer = GetRandomNumber() 'implement to return 1 to 250.
g.DrawString("My\nText", new Font("Tahoma", 20), Brushes.White, new RectangleF(0, 0, g.Width, g.Height), strFormat)  'it may be myBmp.Width, myBmp.Height

Open in new window

HLRosenbergerAuthor Commented:
I found a solution; Google has already done this.|FF0000|000000

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HLRosenbergerAuthor Commented:
google solution.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.