473,324 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Image "stitching" with GD - Help

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?

TIA
Rob

Jul 17 '05 #1
1 2993
go****@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
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: sarah | last post by:
hi all. first time poster so please forgive and maybe direct me to correct group if this is wrong place. tia. i'm after constructing a PHP script to fit within my nuke modules to do this.. ...
8
by: J Krugman | last post by:
I just came across this "pan-able" photo/movie of the Rice testimony before the 9/11 commission: http://www.nytimes.com/packages/html/politics/20040408_RICETESTIMONY/qtvr_popup.html I've never...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.