Imagick::setImageOpacity
(PECL imagick 2, PECL imagick 3)
Imagick::setImageOpacity — Sets the image opacity level
Warning此函数在 Imagick 3.4.4 中被 废弃,强烈建议不要应用此函数。
说明
public Imagick::setImageOpacity
( float $opacity
) : bool
参数
-
opacity
-
The level of transparency: 1.0 is fully opaque and 0.0 is fully
transparent.
范例
Example #1 A Imagick::setImageOpacity() example
An example of using Imagick::setImageOpacity()
<?php
/* Create the object */
$image = new Imagick('source.png');
/* Set the opacity */
$image->setImageOpacity(0.7);
/* output the image */
header('Content-type: image/png');
echo $image;
?>