PHP GD Library - Join images

GD and GD2 are useful libraries for creating graphics on-the-fly. Discuss your PHP GD and GD2 scripts here.

Moderators: onion2k, General Moderators

Post Reply
amir
Forum Contributor
Posts: 287
Joined: Sat Oct 07, 2006 4:28 pm

PHP GD Library - Join images

Post by amir »

Hey,

Is it possible to create a blank image of any size, and then import images and place them onto that image to generate 1 image?

So...

GD creates the canvas (blank image), I then can specify images for GD to use that can be placed onto that image. So at the end, the final result will be just 1 image.

Been trying various things, but nothing works.

Thanks
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

Of course it is. imagecreatetruecolor() to make the canvas, then imagecreatefromjpeg() to load images and imagecopy() to copy them onto the canvas. Easy.
Post Reply