Here is a way to composite an image onto another :
//Creating two Imagick object
$first = new Imagick('first.jpg');
$second = new Imagick('second.jpg');
//Second image is put on top of the first
$first->compositeImage($second, $second->getImageCompose(), 5, 5);
//new image is saved as final.jpg
$first->writeImage('final.jpg');
Imagick::compositeImage
(No version information available, might be only in CVS)
Imagick::compositeImage — ある画像を別の画像に合成する
説明
bool Imagick::compositeImage
( Imagick $composite_object
, int $composite
, int $x
, int $y
[, int $channel
] )
警告
この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。
ある画像を、別の画像の指定した位置に合成します。
パラメータ
返り値
成功した場合に TRUE を返します。
Imagick::compositeImage
vincent dot hoen at gmail dot com
31-Jul-2007 03:44
31-Jul-2007 03:44
