Closed nicky-lenaers closed 8 years ago
Does the same code and image work in chrome? Also, could you post a gist of the entire script and specify in which version doesn't work?
Thanks.
On Monday, February 15, 2016, Nicky Lenaers notifications@github.com wrote:
I'm using the library to compress images. I started with creating the source element like so:
var img_elem = document.createElement('img'); img_elem.src = canvas.toDataURL();
The img_elem, when logged, shows that the element actually has the src attribute filled, so up to this point it all works.
Then, I put it through the compressor:
var compressed = document.createElement('img'); compressed.src = jic.compress(img_elem, 90, 'jpg').src;
Now, when I log compressed it shows:
— Reply to this email directly or view it on GitHub https://github.com/brunobar79/J-I-C/issues/26.
Ah, apologies! I was using another angular plugin for image cropping which was right before I compressed it. It seemed the output of the image cropper is already corrupted, so this compressor is not to blame. Closing this issue!
I'm using the library to compress images. I started with creating the source element like so:
The
img_elem
, when logged, shows that the element actually has thesrc
attribute filled, so up to this point it all works.Then, I put it through the compressor:
Now, when I log
compressed
it shows: