Is a convenience method that scales an image proportionally to twice its original size.
function magnifyImage($image_path)
{
    $imagick = new \Imagick(realpath($image_path));
    $imagick->magnifyImage();
    header("Content-Type: image/jpg");
    echo $imagick->getImageBlob();
}