Layer method type
function mergeImageLayers($layerMethodType)
{
    //$imagick = new \Imagick(realpath("images/LayerTest.psd"));
    //$imagick = new \Imagick(realpath("../public/images/Biter_500.jpg"));
    $imagick = new \Imagick(realpath("../public/images/redDiscAlpha.png"));
    
    
//    
//    $imagick = new \Imagick();
    $blueDisc = new \Imagick(realpath("../public/images/blueDiscAlpha.png"));
    $imagick->addImage($blueDisc);
//    

//    $imagick->addImage($whiteDisc);
    
    $greenDisc = new \Imagick(realpath("../public/images/greenDiscAlpha.png"));
    $imagick->addImage($greenDisc);
    $imagick->setImageFormat('png');

    $result = $imagick->mergeImageLayers($layerMethodType);
    header("Content-Type: image/png");

    echo $result->getImageBlob();
}