Example
function morphImages()
{
$images = [
//"../imagick/images/lories/IMG_1599_480.jpg",
//"../imagick/images/lories/IMG_2837_480.jpg",
"../public/images/lories/IMG_1599_480.jpg",
"../public/images/lories/6E6F9109_480.jpg",
"../public/images/lories/IMG_2561_480.jpg",
];
$imagick = new \Imagick(realpath($images[count($images) - 1]));
foreach ($images as $image) {
$nextImage = new \Imagick(realpath($image));
$imagick->addImage($nextImage);
}
$imagick->resetIterator();
$morphed = $imagick->morphImages(5);
$morphed->setImageTicksPerSecond(10);
header("Content-Type: image/gif");
$morphed->setImageFormat('gif');
echo $morphed->getImagesBlob();
}