Join Images by Php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

Join Images by Php

Post by user___ »

Hi guys,
I need to make from two images one but the second should extend the first. Is that possible with Php? Thanks.
User avatar
Inkyskin
Forum Contributor
Posts: 282
Joined: Mon Nov 19, 2007 10:15 am
Location: UK

Re: Join Images by Php

Post by Inkyskin »

This should be able to be done with GD :)
user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

Re: Join Images by Php

Post by user___ »

Well, I have checked its documentation but there is not a method to join to images and make one bigger. I mean that I have not found out how to out one image after another. For example if I have an image which is ten pixels height and I want to combine it with another whoose height is thirty to make an image of those which is fourty pixels height.
Rovas
Forum Contributor
Posts: 272
Joined: Mon Aug 21, 2006 7:09 am
Location: Romania

Re: Join Images by Php

Post by Rovas »

First there is a GD section on this forum.
Second you make a third image that serves as a canvas for the 2 images the use twice imagecopymerge to put the images on the canvas. Why two times because first operation will be canvas image + first image second operation the resulting image + second image. Watch out for the correct dimensions of the canvas
Post Reply