以下代码使用100x100磁贴作为源图像生成300x100图像:
for (my $i = 0; $i < 3; $i++) {
$image->Read("filepath/100x100.png");
}
$result = $image->Montage(geometry=>'100x100',tile=>'3x1');
如何只从磁盘读取一次,
答案 0 :(得分:2)
文档中并不明显,但您可以将clones添加到图像序列中,如下所示:
$image->Read("filepath/100x100.png");
$image->[1] = $image->[0]->Clone();
$image->[2] = $image->[0]->Clone();
$result = $image->Montage(geometry=>'100x100',tile=>'3x1');