(PECL imagick 2, PECL imagick 3)
Imagick::raiseImage — 建立模擬 3D 按鈕效果
藉由使影像邊緣變亮和變暗,建立模擬三維按鈕效果。raise_info 的 width 和 height 成員定義效果的垂直和水平邊緣寬度。
width
height
x
y
raise
成功時傳回 true
。
範例 1 Imagick::raiseImage()
<?php
function raiseImage($imagePath, $width, $height, $x, $y, $raise) {
$imagick = new \Imagick(realpath($imagePath));
//x 和 y 沒有作用?
$imagick->raiseImage($width, $height, $x, $y, $raise);
header("Content-Type: image/jpg");
echo $imagick->getImageBlob();
}
?>