Image + Image = Image
Moderator: General Moderators
Image + Image = Image
Could someone please explain to me (in a demonstration) how I would go about this. Say I have a body (Head, Body, Legs) now how would I (in PHP) get it so the head.png, body.png and legs.png images go together and come out as just 1 .PNG image?
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
First make sure that the gd library is installed and working. Then take the 3 images and get the size of each - getimagesize(). Then create a new image that is as wide as the widest image, and as tall as all three added together - imagecreatetruecolor().
Then copy the three images to the new one, aranging them so that they fit in order - imagecopyresized().
Save or display the image - imagejpeg()..
Then copy the three images to the new one, aranging them so that they fit in order - imagecopyresized().
Save or display the image - imagejpeg()..