I'm looking for a way to generate an image with various text, provided as a parameter (includes specified font) and I have another image used as a template (some sort of background). Please help in pointing a way to achieve that, if it is actually possible.
Use the canvas tag, see http://diveintohtml5.ep.io/canvas.html.