PHP学会网 php培训网 PHP暑期培训 PHP寒假培训 PHP假期培训 » PHP中高级 » 用php GD实现简单的透明度渐变的算法
本页主题: 用php GD实现简单的透明度渐变的算法 打印 | 加为IE收藏 | 收藏主题 | 上一主题 | 下一主题

meiwang12363

该用户目前不在线
级别: 中级程序员
精华: 1
发帖: 1069
威望: 0 点
金钱: 0 PYMB
贡献值: 0 点
在线时间:8(小时)
注册时间:2007-04-26
最后登录:2007-09-04

用php GD实现简单的透明度渐变的算法



今天因为临时需要,要动态的在图片上添加透明度渐变的效果,在网上找了半天没有相应功能的算法....


自己写了一个:



= 128)
                $alphaX = 127;
        $alpha = imagecolorallocatealpha($imgsrc, 255, 255, 255, $alphaX);
        imagefilledrectangle($imgsrc, ($i+$x1), $y1, ($i+$x1+1), $y2, $alpha);
}
header('Content-type: image/jpeg');
imagejpeg($imgsrc);
imagedestroy($imgsrc);
?>
顶端 Posted: 2007-07-27 21:22 | [楼 主]
PHP学会网 php培训网 PHP暑期培训 PHP寒假培训 PHP假期培训 » PHP中高级

时:11-22 18:51 Copyright © 2006 phpwhy.com 权
ICP05060669

曳息 -