PHP is capable of that but you must have GD library installed and working with PHP. It can be found on: http://www.boutell.com/gd/
It's pretty easy to generate images on the fly, I do it for graphs when I have data that needs to be analyzed. It takes the numbers from the database and creates nice looking graphs.
Hope this was of help.