evanw/glfx.js — Issue #7: Thank you , and one small modification :-)
Author: jivascript
Created: 2012-02-27 17:12:15+00:00
State: open

Hi,

First, I wanted to thank you for your work. Man, what a great lib !

And the small modification was to bypass the modified "canvas.toDataURL" method. I explain myself. I encountered a problem (and perhaps others will too) after applying the following filters: brightness/contrast , hue saturation, unsharp mask (I didn't tested all of the filters but those 3 were obvious). Once I applied the filter, I want to retrieve the base64 content and I was surprised to detect a big difference between the content itself and the resulted code after calling canvas.toDataURL . The result is that after I saved into a image file (png or jpeg) is kind of psychedelic :-) It's not very ugly, but it's not the expected result :-)

So, I saw that you use your own function for "toDataURL". So to be sure I just commented the following line: // canvas.toDataURL = wrap(toDataURL); (in my generated code (non-compressed) it's on line 556 ) and the image gets saved correctly...

Hope it helps others having the same result ..

PS: Really nice work. Thank you !