Page 1 of 1

How i can join two images???

Posted: 2010-02-02T09:33:09-07:00
by mikefried
Hi at All,

I'm new to Imagick and my question is, How i can use two images in one new Image???

first I will create a new emty image with ImageWidth 1000 and ImageHeight 500. Then i will load image1.jpg with image1Width=500 and image1Heigth=500 and place this image on the left hand side. After this i will load image2.jpg (also 500x500) and place this on the right hand side.

How i can to this with Imagick????

Mike

Re: How i can join two images???

Posted: 2010-02-02T11:08:28-07:00
by fmw42
in command line you would use the -append or + append

see http://www.imagemagick.org/script/comma ... php#append

Re: How i can join two images???

Posted: 2010-02-03T00:17:11-07:00
by mikefried
Thank You,

for your quick answer, but i forgot to say, that i'm looking for a solution in PHP.

Now i try to use the example from http://php.net/manual/de/function.imagi ... images.php

Mike

Re: How i can join two images???

Posted: 2010-02-03T01:40:27-07:00
by mikefried
i can't load a image in my new Image??

Code: Select all

$image = new Imagick();
$image->newImage(1000,500, '#00000000'); 
$image->setImageFormat('png');

$input = new Imagick();
$input->readImage($input_path.'auto.jpg');
????????????????????????????
$image->appendImages($input);
?????????????????????????????????
$image->writeImage($output_path.'output_Bild2.png');
How i can place the loaded $input image in my new $image???

Mike

Re: How i can join two images???

Posted: 2010-02-13T19:54:49-07:00
by mkoppanen
compositeImage would be one way