CamanJS - 替换实例

Dar*_*ney 9 javascript html5-canvas camanjs

如果我有一个我应用过滤器的图像,例如Lomo过滤器,是否有办法使当前的Caman实例?

意思是,如果我然后想要对我应用滤镜的图像上的亮度进行播放,并使用this.revert();重置亮度,我希望它恢复到画布上,我刚才应用了滤镜.

这可能吗?

我在尝试应用多种效果时遇到了噩梦,只有一次效果(预设过滤器除外),并通过...

Ter*_*for 1

如果我理解,您想应用示例页面上所示的过滤器(“Lomo”) ,然后摆弄一些属性(如亮度),然后将更改恢复回“Lomo”过滤器?

为什么不再点击过滤器(“Lomo”)呢?

编辑:您可能应该查看指南并使用过滤器中的默认值实现您自己的方法。

u.Filter.register("lomo", function (D) {
        if (D == null) {
            D = true
        }
        this.brightness(15);
        this.exposure(15);
        this.curves("rgb", [0, 0], [200, 0], [155, 255], [255, 255]);
        this.saturation(-20);
        this.gamma(1.8);
        if (D) {
            this.vignette("50%", 60)
        }
        return this.brightness(5)
    });
Run Code Online (Sandbox Code Playgroud)

我不认为你的要求是“开箱即用”的。