以下是如何取得 gif 檔案中影格之間的延遲時間
<?php
$animation = new Imagick("file.gif");
foreach ($animation as $frame) {
$delay = $animation->getImageDelay();
echo $delay;
}
?>
(PECL imagick 2, PECL imagick 3)
Imagick::getImageDelay — 取得影像延遲
此函式沒有參數。
傳回影像延遲。
發生錯誤時拋出 ImagickException。
以下是如何取得 gif 檔案中影格之間的延遲時間
<?php
$animation = new Imagick("file.gif");
foreach ($animation as $frame) {
$delay = $animation->getImageDelay();
echo $delay;
}
?>