可以在这里为背景图像设置滤镜吗
Is it possible to set a filter to a background image here?
我需要对我的背景图像应用过滤器,理想情况下,我希望在添加它的地方进行,并且不更改太多现有代码。这个函数里面有可能吗?
canvas.setBackgroundImage(image_library_selected_url, function() {
canvas.renderAll();
_canvasBrowser_update();
});
不是真的,但这对有效
if(requiresFilters) {
fabric.Image.fromURL(image_library_selected_url, (function(image){
image.filters.push(grayscale);
image.filters.push(tint);
image.applyFilters((function(){
this.canvas.backgroundImage = image.getElement();
this.canvas.renderAll();
}).bind(this));
}).bind(this));
} else {
canvas.setBackgroundImage(image_library_selected_url, function() {
canvas.renderAll();
_canvasBrowser_update();
});
}
相关文章:
- 可以在这里为背景图像设置滤镜吗
- 使用 GSAP 对模糊滤镜进行动画处理
- 在没有滤镜的情况下模糊背景
- Kineticjs 将 Mask 滤镜应用于图层
- 将特殊效果应用于所选滤镜
- 角度滤镜不打印空格
- HTML5 画布对比度滤镜
- 如何在IE中将灰度和反转效果与SVG滤镜相结合
- 根据容器设置代码镜像实例的焦点
- 角度滤镜和 NgAnimate 冲突
- 根据滤镜的值有条件地添加 ng-animate 指令
- D3:将滤镜作为背景添加到SVG元素
- 如何为图像添加滤镜(模糊)
- 推特打字,寻血猎犬滤镜开始
- 从一个画布复制带有滤镜的图像并粘贴到另一个画布
- Array.滤镜打破狩猎印花
- Kinetijs:应用滤镜后阴影模糊不起作用
- HTML5画布不能应用sw滤镜
- 选择滤镜不适用于cellTemplate, angular ui-grid
- 如何为对象制作滤镜