首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

Imagick::shadeImage

(PECL imagick 2.0.0)

Imagick::shadeImage — Creates a 3D effect

Description

代码语言:javascript
复制
bool Imagick::shadeImage ( bool $gray , float $azimuth , float $elevation )

Shines a distant light on an image to create a three-dimensional effect. You control the positioning of the light with azimuth and elevation; azimuth is measured in degrees off the x axis and elevation is measured in pixels above the Z axis. This method is available if Imagick has been compiled against ImageMagick version 6.2.9 or newer.

Parameters

gray

A value other than zero shades the intensity of each pixel.

azimuth

Defines the light source direction.

elevation

Defines the light source direction.

Return Values

Returns TRUE on success.

Errors/Exceptions

Throws ImagickException on failure.

Examples

Example #1 Imagick::shadeImage()

代码语言:javascript
复制
<?php
function?shadeImage($imagePath)?{
????$imagick?=?new?\Imagick(realpath($imagePath));
????$imagick->shadeImage(true,?45,?20);
????header("Content-Type:?image/jpg");
????echo?$imagick->getImageBlob();
}

?>

← Imagick::setType

Imagick::shadowImage →

代码语言:txt
复制
 ? 1997–2017 The PHP Documentation Group

Licensed under the Creative Commons Attribution License v3.0 or later.

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com