文字

Imagick::shadowImage

(PECL imagick 2.0.0)

Imagick::shadowImageSimulates an image shadow

说明

bool Imagick::shadowImage ( float $opacity , float $sigma , int $x , int $y )

Simulates an image shadow.

参数

opacity

sigma

x

y

返回值

成功时返回 TRUE

范例

Example #1 Imagick::shadowImage()

<?php
function  shadowImage ( $imagePath ) {
    
$imagick  = new \ Imagick ( realpath ( $imagePath ));
    
$imagick -> shadowImage ( 0.4 10 50 5 );
    
header ( "Content-Type: image/jpg" );
    echo 
$imagick -> getImageBlob ();
}

?>

用户评论:

[#1] nilayanand at gmail dot com [2009-07-27 10:43:21]

<?php

$im = new Imagick'a.jpg' );
$im->setImageFormat("png");
 

$im->thumbnailImage200null );
 

$shadow $im->clone();
 

$shadow->setImageBackgroundColor( new ImagickPixel'black' ) );
 

$shadow->shadowImage8035);
 

$shadow->compositeImage$imImagick::COMPOSITE_OVER0);
 

header"Content-Type: image/jpeg" );
echo 
$shadow;
?>

上一篇: 下一篇: