note 95759 modified in function.imagick-compositeimage by danbrown
| From: | danbrown@php.net | Date: | Wed, 20 Jan 2010 16:32:54 +0000 |
| Subject: | note 95759 modified in function.imagick-compositeimage by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-165140@lists.php.net to get a copy of this message | ||
You might need to set the colorspace the same when composing two images over each other
<?php
//Creating two Imagick object
$first = new Imagick('first.jpg');
$second = new Imagick('second.jpg');
// Set the colorspace to the same value
$first->setImageColorspace($second->getImageColorspace() );
//Second image is put on top of the first
$first->compositeImage($second, $second->getImageCompose(), 5, 5);
//new image is saved as final.jpg
$first->writeImage('final.jpg');
?>
--was--
You might need to set the colorspace the same when composing two images over each other
<?
//Creating two Imagick object
$first = new Imagick('first.jpg');
$second = new Imagick('second.jpg');
// Set the colorspace to the same value
$first->setImageColorspace($second->getImageColorspace() );
//Second image is put on top of the first
$first->compositeImage($second, $second->getImageCompose(), 5, 5);
//new image is saved as final.jpg
$first->writeImage('final.jpg');
http://php.net/manual/en/function.imagick-compositeimage.php