Create an Image on the fly ...

My Requirement is as follows:

1. I would be showing design templates of business cards to the user as a gif.

2. The user after selecting a particular design, would type in the details he want inside the business card in the text boxes provided.

3. On submitting, the page should get refreshed and the image (design template selected by the user) should contain those text in it.

Please note you can either use ASP or PHP as a scriting language. You can also use VB for creating a COM if need be but my final output should be in a webbrowser.
(You can check for further details. That site has used .cgi to achieve this desired result). I am desperatly in need of that code ASAP.

Thanks & Regards
Who is Participating?
brunoConnect With a Mentor Commented:
in ASP you need a object to do that:

in PHP i think the ability to do that is built right in....

PHP does not have built in support for that, you will need the gdlib to do that. After that it is fairly easy.

An object isn't necessary, but it does make life MUCH easier. ASP pages can write out images as long as the imagedata is written correctly (for example coming from a database).


This has been cross-posted in 3 TAs at 500 per posting, you might want to get an undertaking from the questioner on how they intend to resolve that, considering the amount of work involved.

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Michel SakrCommented:
here you will find some dlls and their sample codes..

no need for custom components.. you may use custom components to access the database and to do some business logic..

Michel SakrCommented:
I see it as a homework..?
at EE we don't do full implementations of homeworks/tasks.. we mainly guid users to their destinations.. we may code some parts of the project.. fix errors.. so start by the guidelines we gave you..
(Urgent is a relative understanding)
VadivelmcaAuthor Commented:

I am going through the site you have specified. A basic doubt does ASPImage support adding or modifying of text into an image.


I would go through the link you have specified and then discuss regarding that. In the mean time i thought i would clarify onething, I didn't expect a source code from anyone of you. I am just looking for some guidelines only.
Guidlines???  How about, read a book or two...

This is a huge project...  I estimate $4K to $5K.
Richie_SimonettiIT OperationsCommented:
I have a simple ocx as a base (well, more than base), but i don't like to post here but in VB TA.
indeed did it once. Paid well ;-)
>>> This is a huge project...  I estimate $4K to $5K

If I understand the requirements correctly, this is not at all a big deal. A simple solution, requiring server side technology, can be found through ImageMagick:

check out a perl-driven web demo at:


"Please note you can either use ASP or PHP as a scriting language. You can also use VB for creating a
COM if need be but my final output should be in a webbrowser."

Last time I checked, Imagemagic was CGI...
With ASP and/or VB, you would use

LeadTools Raster Imaging


PegasusTools ImageXPress

These tools are neither free but inexpensive but are usually the developers' choice when it comes to image editing.


+ VB: If you have some experience using VB you could do basic image editing yourself, but you would save as JPG, not as GIF.
Myself, I am both able to save an image as JPG, and adding text to an image, but it would take me a few days to merge both projects.
So if you're a beginner with that it's probably easier to buy the above linked components.

+ PHP: PHP (as well as other languages other than ASP/VBScript) do have image editing modules but you won't find many experts for this in the ASP topic area.

+ GIF: The GIF compression algorithm is patented by
Products like (the mentioned) LeadTools or PegasusTools use this original algorithm, and include the license for client-side image processing (like a desktop application)
(their licensing policy for server-side applications has not been clearly communicated. hence, to be on the right way, you would contact them per email about that -- anyways, those components will work).
Free PHP and Perl imaging modules (like mentioned by coreyit) "may" produce GIF files, but by using another than the patented compression algorithm (a suboptimal one). That's why the GIF files saved by them look blurry, and why the process of saving a GIF takes so much time.
(After all, try to not use GIF. It's proprietary, and expensive.)
clockwatcherConnect With a Mentor Commented:
I wrote one up as a demonstration for another questioner a few years back.  I can't find the stupid question to reference it.  But, he was interested in seeing it done using VB and ASP.

I put the demo back online (temporarily) at:  

All source code and files are in a zip at:

See the readme in that file for more info.

I really suggest purchasing a control and using that (see robbert's or brunobear's comments), but if your interested in taking a look at some source code and how you might go about actually writing one in VB, feel free to download it and take a look.

BTW, it would have been much easier to write the control in Java or C++ (especially now with Microsoft's GDI+)-- but the questioner wanted it in VB.
As long as you have the GD library installed (which is free), you can create, load and manipulate JPEG, PNG, GIF, BMP images with w/o problems.

Short example:

Source code for the above example:
$img     =ImageCreateFromJPEG("../../images/water.jpg");
ImageString($img,5,100,100,"I'm dynamic: ".$HTTP_GET_VARS['text'],0xff0000);

That's all ;)
For ImageMagick with php, take a look at:

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept Answer by clockwatcher
Please leave any comments here within the next seven days.
EE Cleanup Volunteer
500 point Q, and certainly more than one good answer.  I believe my original comment should be worth something without feedback from the questioner.

I recommend a split please.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.