In writing a map application with ColdFusion I needed to create some custom icons and discovered an easy way to take any small icon and create hundreds of them with sequential numbers overlayed on top of the icon.
There are a number of sites with free icons, but they all seem to stop at 99, I needed to go into the hundreds in some cases, which made me start to look at what cfimage can do for me.
First, I went I downloaded a default Google icon as my base (20x34px), then I created new blank icons with differing colors within Photoshop. I saved all the blank icons in a directory called /icons off my root directory. Once I have all the blanks I then edit the list in the below script.
The script will create a directory for each color, so for blue you will have /icons/blue/mapicon1.png thru mapicon99.png or however you create.
I think you could move the ImageNew out of the loop and into a variable but it works as written and is a one time conversion.
My next idea is to have user generated icons, by having the users select the background and text color.
I also want to create multiple lists to change the text color, since some backgrounds need black text.
This should be enough to get you started. Enjoy.