PHP Conference Japan 2024

Imagick::compareImageLayers

(PECL imagick 2,PECL imagick 3)

Imagick::compareImageLayers傳回影像之間的最大邊界區域

描述

public Imagick::compareImageLayers(int $method): Imagick

比較序列中每個影像與下一個影像,並傳回其發現的任何像素差異的最大邊界區域。 如果 Imagick 是針對 ImageMagick 6.2.9 或更新版本編譯的,則此方法可用。

參數

method

其中一個圖層方法常數

傳回值

成功時傳回 true

錯誤/例外

發生錯誤時拋出 ImagickException。

範例

範例 1 使用 Imagick::compareImageLayers()

比較影像圖層

<?php
/* 建立新的 Imagick 物件 */
$im = new Imagick("test.gif");

/* 優化影像圖層 */
$result = $im->compareImageLayers(imagick::LAYERMETHOD_COALESCE);

/* 處理 $result */
?>

另請參閱

新增註解

使用者貢獻註解

此頁面沒有使用者貢獻註解。
To Top