Imagick::frameImage

三次元の枠線をシミュレートする

説明

public bool Imagick::frameImage(
    mixed $matte_color,
    int $width,
    int $height,
    int $inner_bevel,
    int $outer_bevel
)

画像の周りに三次元の枠線を追加します。 width と height で、それぞれ縦の枠線と横の枠線の幅を指定します。 inner_bevel および outer_bevel は、 それぞれ枠の内側と外側の影の幅を指定します。

パラメータ

matte_color

マット色を表す ImagickPixel オブジェクトあるいは文字列。

width

枠の幅。

height

枠の高さ。

inner_bevel

内側の影の幅。

outer_bevel

外側の影の幅。

戻り値

成功した場合に true を返します。

エラー / 例外

エラー時に ImagickException をスローします。

変更履歴

バージョン 説明
PECL imagick 2.1.0 色を表す文字列を最初のパラメータとして指定できるようになりました。 これまでのバージョンでは ImagickPixel オブジェクトしか指定できませんでした。

例1 Imagick::frameImage

<?php
function frameImage($imagePath$color$width$height$innerBevel$outerBevel) {
    
$imagick = new \Imagick(realpath($imagePath));

    
$width $width $innerBevel $outerBevel;
    
$height $height $innerBevel $outerBevel;

    
$imagick->frameimage(
        
$color,
        
$width,
        
$height,
        
$innerBevel,
        
$outerBevel
    
);
    
header("Content-Type: image/jpg");
    echo 
$imagick->getImageBlob();
}

?>