|
Posted by The Natural Philosopher on 10/18/07 17:20
crazychrisy54@hotmail.com wrote:
> Hi there
>
> I just wondered if there is any way using GD to insert a clickable
> button or some clickable text into a image? It is possible to create
> images for buttons but what if you want a clickable button *inside*
> another image.
Yup. Its not that hard - there are some ways to do it: Here is mine.
Use a background image in a table cell. Then add clickable text or
another image over the top.
If you specify the table cell size and use non repeating backgrounds of
transperent edged GIFS it needn;t be a reatngular image either.
>
> I don't know if this is along the right lines but the following code
> puts a image inside another image. Perhaps I could then make im2
> clickable or is it just not possible? Any help would be very much
> appreciated!
>
> Thanks
> Chris
>
> <?php
> $im = ImageCreate(800,800);
> $im_color = ImageColorAllocate($im, 0, 255, 0);
>
> $im2 = ImageCreate(200,200);
> $im_color2 = ImageColorAllocate($im2, 255, 0, 0);
>
> // copy image into new resource
> imagecopy($im, $im2, 0, 0, 0, 0, 60, 60 );
>
> header ("Content-type: image/png");
> ImagePNG($im);
> ?>
>
Navigation:
[Reply to this message]
|