前提
代码如下:
获取图层数目@H_502_6@
代码如下:
getNumberImages();
获取所有参数:
@H_502_6@ 代码如下:getNumberImages(); $i < $num_layers; ++$i) {
$im->setImageIndex($i); //this
$im->setIteratorIndex($i); //or this is kinda redundant
$pagedata=$im->getImagePage();
//print("x,y: " + $pagedata["x"].",".$pagedata["y"]."
\n");
//print("w,h: " + $pagedata["width"].",".$pagedata["height"]."
\n");
foreach($im->getImageProperties("*") as $k => $v) print("$k: $v
\n");
//export layer
//$im->writeImage('layer_' . $i . '.png'); //导出所有图层到单独的png文件
}
原文链接:https://www.f2er.com/php/22784.html
$im->setImageIndex($i); //this
$im->setIteratorIndex($i); //or this is kinda redundant
$pagedata=$im->getImagePage();
//print("x,y: " + $pagedata["x"].",".$pagedata["y"]."
\n");
//print("w,h: " + $pagedata["width"].",".$pagedata["height"]."
\n");
foreach($im->getImageProperties("*") as $k => $v) print("$k: $v
\n");
//export layer
//$im->writeImage('layer_' . $i . '.png'); //导出所有图层到单独的png文件
}