Longhorn PHP 2025 - Speakers and Schedule Announced!

Voting

: six minus four?
(Example: nine)

The Note You're Voting On

giso at connectholland dot nl
15 years ago
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');
?>

<< Back to user notes page

To Top