So i was troubled with how to open and display a psd file with PHP’s imagick component.
I came to the following result, apparently imagick imports all the layers, and by using the image iterator, you can go through them.
The iterator index 0 is the whole image merged together.
By using this simple code, notice the setIteratorIndex(), i succesfully displayed a few multilayered psd files.
setIteratorIndex(0);
$im->setImageFormat('png');
header("Content-Type: image/png");
echo $im;
?>