我正在使用dojox.gfx来创建和操作矢量图形。我需要调整对比度,并对它们应用模糊,变暗/变亮效果?
我需要支持的浏览器是IE 8+。因此,我必须在SVG(IE9)和VML(IE8)上实现这些功能
有没有办法做到这一点?通过dojo或任何其他库。
发布于 2012-10-30 22:51:16
这是针对svg的:
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200">
<filter id="brightness">
<feComponentTransfer>
<feFuncR type="linear" slope="4"/>
<feFuncG type="linear" slope="4"/>
<feFuncB type="linear" slope="4"/>
</feComponentTransfer>
</filter>
<image filter="url(#brightness)" x="0" y="0" width="200" height="100" xlink:href="pic.png" />
</svg>对于VML,我不确定。
它可能是黑色级别属性,值在-0.5(纯黑色)和0.5(纯白色)之间
<v:image style='width:200px;height:100px' src="images/temporary/pic2.png" blacklevel="-0.2"/>这是vml黑电平属性的链接
http://msdn.microsoft.com/en-us/library/bb229563%28v=vs.85%29.aspx
https://stackoverflow.com/questions/12786550
复制相似问题