One might be suprised that there seems to be no difference between:
<?php
$imagick = new Imagick();
$imagick->clear();
$imagick->readImage('myfile.jpg');
?>
and
<?php
$imagick = new Imagick();
$imagick->destroy();
$imagick->readImage('myfile.jpg');
?>
Both functions reset all options and clear all used resources so you might want to use either one of them.
See also: http://php.net/manual/en/imagick.destroy.php
Imagick::clear
(PECL imagick 2.0.0)
Imagick::clear — Imagick オブジェクトに関連付けられたすべてのリソースをクリアする
説明
bool Imagick::clear
( void
)
Imagick オブジェクトに関連付けられたすべてのリソースをクリアします。
返り値
成功した場合に TRUE を返します。
markus dot s dot schmitz at gmail dot com ¶
5 months ago
