首页 > php函数 > php imagealphablending

php imagealphablending

imagealphablending(PHP 4中 >= 4.0.6,PHP 5中)

imagealphablending - 设置图像混合模式

报告错误描述

布尔imagealphablending($img,$blendMode $)

imagealphablending()两对真彩色图像绘制不同的模式允许。在混合模式下,供应的,如imagesetpixel所有绘图功能,颜色的alpha通道组件()决定了底层的颜色应允许穿透。因此,广东在混合自动绘图与现有的色点的颜色,在图像存储的结果。由此产生的像素是不透明的。在非混合模式,绘图颜色复制其字面alpha通道信息,替换目标像素。混合模式用时没有对调色板图像绘图。

报告错误参数

图片

图像资源,通过创造的图像功能,如,一返回imagecreatetruecolor()。

将对blendMode

是否启用了混合模式或不。默认为FALSE。

报告错误返回值

返回TRUE,成功或失败则返回FALSE。

报告错误的例子

例子1 imagealphablending()使用示例

<?php
// Create image
$im = imagecreatetruecolor(100, 100);
// Set alphablending to on
imagealphablending($im, true);
// Draw a square
imagefilledrectangle($im, 30, 30, 70, 70, imagecolorallocate($im, 255, 0, 0));
// Output
header('Content-type: image/png');
imagepng($im);
imagedestroy($im);
?>


永久链接:http://www.phprm.com/function/imagealphablending.html

转载随意!带上文章地址吧。

标签:none

发表留言