Closed max-degterev closed 11 years ago
This is because initialization is asynchronous as well, not just rendering. You're calling render() on the instance before the pixelData is read.
Can you look it up before closing it?
this.caman = Caman(this.canvas);
var that = this;
$(window).on('load', function() {
setTimeout(function(){
that.caman.sepia(140).render();
}, 3000);
});
Same result.
Apologizes, I just realized what the problem is. Currently Caman assumes it's been given an image when it's initialized with only 1 argument. This is something that should be fixed. I'll work on it today.
Great many thanks!
That should do the trick. Remember, initialization is still asynchronous, but you can now initialize a canvas that already has image data in it with no problem.
Hi!
I'm building an instargam-like webapp that allows you to upload filtered images to a server.
I'm having an issue with returned instance of caman
Using it like this:
works OK. However this:
fails with this error: http://imm.io/LXPy
TypeError: this.c.pixelData is undefined n = this.c.pixelData.length;