Reply to Re: PHP Image functions -- help

Your name:

Reply:


Posted by NC on 04/04/06 01:55

Hemanth wrote:
>
> Could anyone throw some light on the following questions, please?
>
> 1) How can I add a hyperlink to an image file generated using GD
> library?
> For eg., I'm using ImageString(...) function to add text to a JPEG
> image. I want to make that text an hyperlink.

You can't. What you can do is to figure out what area of the image the
text occupies and define that area as a hyperlink using an image map
(image maps are defined in HTML). But you will have to do it OUTSIDE
the script that generates the image.

> 2) How do I insert another gif/jpeg image into an image generated
> using GD library?

1. Create a new image with imagecreate().
2. Read the existing gif/jpeg image using imagecreatefromgif()/
imagecreatefromjpeg().
3. Copy that image into the one you are working on using
imagecopy().
4. Output the new image.

For more information, refer to the PHP Manual:

http://www.php.net/imagecreate
http://www.php.net/imagecreatefromgif
http://www.php.net/imagecreatefromjpeg
http://www.php.net/imagecopy

Cheers,
NC

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация