|
Posted by Oli Filth on 06/26/05 20:51
gojuka@si.rr.com said the following on 26/06/2005 16:12:
> Hi All
>
> I have (what seems to be) a rather simple problem I'd like to solve
> using PHP with the GD library installed. I would like to "stitch"
> multiple images together so that they appear next to each other, but
> create a new file while doing this. For example, lets say I have 5
> images named 1.gif through 5.gif, each containing the digits 1-5
> respectively. I would like use GD to place them next to each other in
> a new image (1 single image), so they read "12345" when displayed in
> the browser. I do not want to have the 5 images simply displayed next
> to each other.
>
> Can this be done with GD?
>
Yes.
Create a blank image using createtruecolor() with dimensions big enough
to fit all five sub-images.
Then simply run imagecopy() five times, specifiying the new image as
destination every time, and each of sub-images in turn as source, and
calculate the position of the top-left corner in the destination image
each time.
--
Oli
[Back to original message]
|