PHP - 使用图像生成透明度(或不透明度)渐变 [英] PHP - Generate transparency (or opacity) gradient using image

查看:538
本文介绍了PHP - 使用图像生成透明度(或不透明度)渐变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用PHP可以拍摄现有图像并生成副本,其中原始图像从100%不透明变为0%不透明(或0%透明变为100%透明!)?

Using PHP is it possible to take an existing image and produce a copy where the original image changes from 100% opaque to 0% opaque (or 0% transparent to 100% transparent!)?

谢谢,

Toby

编辑:我意识到我的问题不清楚,道歉。我想拍摄一张图片并在其上创建不透明度渐变,因此图像顶部是100%不透明,底部是100%透明,中间是半透明。

I realise my question was unclear, apologies. I want to take an image and create an opacity gradient across it, so the image is 100% opaque at the top, 100% transparent at the bottom and translucent in between.

推荐答案

好吧,如果你把图像从100%变为0%,它会消失吗?和0%到100%意味着它是透明的,所以它变黑了?我不确定你要问的是尝试本教程

Well if you take an image from 100% to 0%, it disappears right ? and 0% to 100% means it was transparent so it went black? I'm not sure exactly what you are asking bu try this tutorial

这篇关于PHP - 使用图像生成透明度(或不透明度)渐变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆