views:

209

answers:

3

Could any one please give me pointers as to how one can add text to images dynamically. For example a person fills up text form and selects an image . Then after clicking the submit button the text input by the visitor gets added to the image. To understand it better please check : http://www.vistaprint.com/ . In this site this has been achieved without using flash.

Any pointers on how to achieve this would be greatly appreciated. THanks

PS: Another site which does something similar eyebuydirect.com/eyetry.php

+1  A: 

in http://www.vistaprint.com/ they just submit Ajax request on http://www.vistaprint.com/vp/ns/studiotext.aspx and it returns compiled image. This image just a rendered text they position absolutely inside card.
Depending on what do you want SVG/VML(raphael for cross browser) could be taken in consideration. This will allow render image without server requests.

Eldar Djafarov
Thanks for your answer. This, I think, is exactly what I need. Would be thankful ,if you could give some good links to help me get started on understanding SVG and VML at length. Thanks
Saurabh
+1  A: 

There are plenty of options, depending on which technology you have available, and what you want to do with the image once it has been generated.

My recommendation is to generate the image using server-side technology. For example, if you have .NET available you could use the System.Drawing classes to create the image.

Other solutions include CSS positioning, Flash, or SVG, none of which would required server-side technology, but may limit the subsequent use of the image.

apathetic
Thanks a lot for your answer. Covers all aspects of the question well.
Saurabh
A: 

you need to do it server side, if your using php see http://us2.php.net/manual/en/book.image.php

Jcubed
Thanks for your answer . I am trying to achieve somthing similar in drupal since php script can be inserted inside pages in it so this does come in handy
Saurabh