參考資料:
http://www.php.net/manual/zh/book.imagick.php
前提
獲取圖層數目
獲取所有參數:
$im->setImageIndex($i); //this
$im->setIteratorIndex($i); //or this is kinda redundant
$pagedata=$im->getImagePage();
//print("x,y: " + $pagedata["x"].", ".$pagedata["y"]."<br/>/n");
//print("w,h: " + $pagedata["width"].", ".$pagedata["height"]."<br/>/n");
foreach($im->getImageProperties("*") as $k => $v) print("$k: $v<br/>/n");
//export layer
//$im->writeImage('layer_' . $i . '.png'); //導出所有圖層到單獨的png文件
}
新聞熱點
疑難解答