Click to See Complete Forum and Search --> : Building an image on the fly


ticktack
05-18-2003, 03:48 PM
Hi all,

I what to develop a page which holds an image of the world. Clients can state which countries that they have been to and the countries will be displayed graphically on the world map. Now there are over 100 countries and they can be put on the world map in any amount and combination.

I think that I can do it using layers but the download page size could be huge. I have seen some pages around which are a single image containing all the relevant counties using png files. The only way that I can find in order to download a single image with all the appropriate counties on the image is to have all the possible combinations stored on the server. This will mean that over 400,000 images will be needed for every possible combination.

Does any on know of a better way of doing this? There has to be a better way

Thanks

Graham

AdamGundry
05-18-2003, 04:08 PM
You could use a server-side language such as PHP to assemble a single image using multiple source files, but it would be a rather complicated script. You'll need to find out what languages your server supports, then search for a script to do this (extremely unlikely), learn the appropriate language, or get someone to write one for you.

Adam

ticktack
05-18-2003, 04:14 PM
Thanks,
I'm afraid I'm an ASP man and am not that familiar with PHP. I was afraid that you were going to say that it was going to be complicated. Do you know if it would be possible in ASP? Do you know what this technique is called?

Thanks
Graham

AdamGundry
05-19-2003, 01:20 AM
I'd probably call it "dynamic image generation" or something similar. I know PHP can do it, and from a quick search it looks like ASP.NET can, but ASP needs an add-on.

Check out this tutorial:
http://www.aspheute.com/english/20000728.asp

Alternatively, search the 'net for another suitable ASP tutorial, and if you have any questions post in the ASP forum.

Adam