added 'desharpen' enhancement, auto run it before 'sharpen' so that sharpening effects are not always applied over themselves (although this is quite unperformant)

This commit is contained in:
Bala Clark 2011-08-31 20:26:31 +02:00
parent 3035b44e85
commit 03d92525af

View file

@ -593,6 +593,8 @@ function ComicBook(id, srcs, opts) {
*/
sharpen: function (params) {
this.desharpen();
var opts = merge({ amount: 0 }, params);
options.enhance.sharpen = opts;
@ -602,6 +604,11 @@ function ComicBook(id, srcs, opts) {
});
init();
},
desharpen: function() {
delete options.enhance.sharpen;
ComicBook.prototype.drawPage();
}
};