图像亮度与html5 / CSS / JS [英] Image brightness with html5/CSS/JS
本文介绍了图像亮度与html5 / CSS / JS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的项目中,我试图创造一个环境照明感觉。我通过客户端编码处理图像,我需要调整几个图像的亮度。我知道有像Pixastic这样的库,但我想要的解决方案直接应用到HTML代码(如标签),而不是JS中的Image对象。
In my project, I'm trying to create an ambient lighting feel. I handle images via client side coding and I need to adjust brightness of several images. I know there are libraries such as Pixastic, but I want a solution which applies directly into HTML code(like tags) rather than Image objects in JS. Are there any Javascript or CSS based way to do it?
推荐答案
如Blender所说,< canvas>
标签是您想要用于gamma操作的标签,这是一种非线性的逐像素转换。
As Blender suggests, the <canvas>
tag is what you want for gamma manipulation, which is a non-linear per-pixel transformation.
这篇关于图像亮度与html5 / CSS / JS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文