fixed bug with saving applied enhancements
This commit is contained in:
parent
9c8bc6ee6c
commit
fb35110066
1 changed files with 8 additions and 3 deletions
|
@ -265,9 +265,9 @@ function ComicBook(id, srcs, opts) {
|
|||
// draw the page(s)
|
||||
context.drawImage(page, offsetW, offsetH, page_width, page_height);
|
||||
if (options.displayMode === "double" && typeof page2 === "object") { context.drawImage(page2, page_width + offsetW, offsetH, page_width, page_height); }
|
||||
|
||||
|
||||
// apply any image enhancements previously defined
|
||||
$.each(options.enhance, function(action, options){
|
||||
$.each(options.enhance, function(action, options) {
|
||||
ComicBook.prototype.enhance[action](options);
|
||||
});
|
||||
};
|
||||
|
@ -340,7 +340,7 @@ function ComicBook(id, srcs, opts) {
|
|||
var opts = merge({ brightness: 0, contrast: 0 }, params);
|
||||
|
||||
// remember options for later
|
||||
options.enhance.brightness = options;
|
||||
options.enhance.brightness = opts;
|
||||
|
||||
// run the enhancement
|
||||
Pixastic.process(canvas, "brightness", {
|
||||
|
@ -356,8 +356,11 @@ function ComicBook(id, srcs, opts) {
|
|||
* Force black and white
|
||||
*/
|
||||
desaturate: function () {
|
||||
|
||||
options.enhance.desaturate = {};
|
||||
|
||||
Pixastic.process(canvas, "desaturate", { average : false });
|
||||
|
||||
init();
|
||||
},
|
||||
|
||||
|
@ -373,6 +376,8 @@ function ComicBook(id, srcs, opts) {
|
|||
|
||||
var opts = merge({ amount: 0 }, params);
|
||||
|
||||
options.enhance.sharpen = opts;
|
||||
|
||||
Pixastic.process(canvas, "sharpen", {
|
||||
amount: opts.amount
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue