You are here: Re: Image "stitching" with GD - Help « PHP Programming Language « IT news, forums, messages
Re: Image "stitching" with GD - Help

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

 

Navigation:

[Reply to this 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

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