Dynamic PHP image

I recently followed the guide on creating dynamic images at http://www.icemelon.com/tutorials/9/Dynamic_Images.htm yet I am completely baffled onto how I would display data loaded from a mysql database in the image. I have scowered the internet for this and have tried, what feels like, hundreds of different methods from my own knowledge and none seem to work…
All I want to do is display user’s email addresses, which are stored in a mysql database in an image to prevent spambots from harvesting that information.