开发者

PHP - Generate transparency (or opacity) gradient using image

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!)?

Thanks,

Toby

EDIT: 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.


If you change from 100% opaque to 0% opaque the image wouldn't be visible anymore. What do you want to do exactly? Change The whole Image or only a part? I would consider of using CSS (maybe + javascript) where you are able to set the transparency between 0% and 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜