【问题标题】:Using Preset Filters From CamanJS API使用来自 CamanJS API 的预设过滤器
【发布时间】:2013-03-26 23:14:36
【问题描述】:

我正在使用 CamanJS 插件对图像应用效果,我想知道如何应用 here 找到的 lomo、sin city、cross process 等预设效果。 CamanJS 的文档没有详细说明这一点。

我尝试了下面的代码来应用晕影效果,但没有成功。

Caman("#effects", function () {

        this.resize({width: 650,height: 400
         });
         this.vignette();
        this.render();

            });

【问题讨论】:

    标签: javascript html api web camanjs


    【解决方案1】:

    晕影过滤器需要一个尺寸才能工作。它可以是绝对数字或百分比。

    this.vignette(400);
    this.vignette("10%");
    

    它还接受一个可选的强度参数,范围为 0-100。

    this.vignette("10%", 40);
    

    您是对的,所有过滤器都应该有更好的文档记录。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-26
      • 1970-01-01
      • 2021-07-14
      • 1970-01-01
      • 2020-11-24
      • 2013-05-31
      相关资源
      最近更新 更多