yesterday i uploaded a glitter tool in my website www.ultimateweblogos.com everyhthing is working fine...but i wanna provide an option "save image" to visitors..so that they should be able to save the whole generated image directly into their system...you can just look at once... now if any visitors right click the image to save, he/she can save only the letters of the word generated not the whole word(generated)...please help me to solve this.. .your response is appreciated..
There are many ways to do it, the simplest would probably be to use the GD library. You want to do something like: <? header ("Content-type: image/png"); $src = array ("http://www.ultimateweblogos.com/tipos/1/d.gif","http://www.ultimateweblogos.com/tipos/1/o.gif","http://www.ultimateweblogos.com/tipos/1/g.gif"); $imgBuf = array (); foreach ($src as $link) { case 'gif': $iTmp = imagecreatefromgif($link); array_push ($imgBuf,$iTmp); } $iOut = imagecreatetruecolor ("450","131") ; imagecopy ($iOut,$imgBuf[0],0,0,0,0,imagesx($imgBuf[0]),imagesy($imgBuf[0])); imagedestroy ($imgBuf[0]); imagecopy ($iOut,$imgBuf[1],0,54,0,0,imagesx($imgBuf[1]),imagesy($imgBuf[1])); imagedestroy ($imgBuf[1]); imagecopy ($iOut,$imgBuf[2],15,54,0,0,imagesx($imgBuf[2]),imagesy($imgBuf[2])); imagedestroy ($imgBuf[2]); imagepng($iOut); ?> PHP: This should do create an image with the word 'dog' in it base on the first style. Of course this will just get you started. You'll need to make the $src array dynamic based on the letters and style you need. Also you need to make the second half into a loop and do some clever calculations with the imagecreate() so that it is the right size and each style is has a different size so you have to deal with that as well.
THANKS ...But how to create a cache directory so that all images(words) generated by visitors should be saved in that directory(writable)
i think the server does not support gd lib....is there any other options to provide the save option to visitors...please help me....check out the file www.ultimateweblogos.com/logo.php please review and help me......