admin管理员组文章数量:1388225
I am using CamanJS plugin to apply effects to images, I want to know how do I apply preset effects like lomo, sin city, cross process, etc found here. The documentation of CamanJS does not elaborate on this properly.
I tried the below code to apply vignette effect , but was not successful.
Caman("#effects", function () {
this.resize({width: 650,height: 400
});
this.vignette();
this.render();
});
I am using CamanJS plugin to apply effects to images, I want to know how do I apply preset effects like lomo, sin city, cross process, etc found here. The documentation of CamanJS does not elaborate on this properly.
I tried the below code to apply vignette effect , but was not successful.
Caman("#effects", function () {
this.resize({width: 650,height: 400
});
this.vignette();
this.render();
});
Share
Improve this question
edited Apr 4, 2024 at 15:27
Brian Tompsett - 汤莱恩
5,89372 gold badges61 silver badges133 bronze badges
asked Apr 4, 2013 at 18:16
user1910290user1910290
5374 gold badges15 silver badges28 bronze badges
1 Answer
Reset to default 9The vignette filter requires a size in order to work. It can either be an absolute number or a percentage.
this.vignette(400);
this.vignette("10%");
It also takes an optional strength parameter whose range is 0-100.
this.vignette("10%", 40);
You're right though, all of the filters should be documented better.
本文标签: javascriptUsing Preset Filters From CamanJS APIStack Overflow
版权声明:本文标题:javascript - Using Preset Filters From CamanJS API - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744571263a2613353.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论