希望使用這些函式儲存的使用者應該知道,這可以很容易地實現,例如
<?php
header ("Content-Type: image/{$Imagick->getImageFormat()}");
$data = $Imagick->getImageBlob ();
echo $data;
file_put_contents ('test.png', $data);
?>
這將顯示影像,然後將其儲存到 test.png。尤其是在您需要在建立影像後重新載入影像或儲存以備將來使用時,此類操作很有用。:)