nodeca/pica — pull request #4 by noomorph (2014-09-25 07:03:51+00:00)
Title: IE11 mobile bugfix

Fixed bug in IE11 on WP8.1 - no .set() method in CanvasPixelArray

On Lumia 1020 (WP8.1, IE11) I could see [this picture](http://i.imgur.com/cb1kcaK.jpg).

After fix (with pica.WW = false, web workers off), now it looks this [this way](http://i.imgur.com/yj7mQBH).

The problem was that in IE's canvas the [getImageData()](http://msdn.microsoft.com/en-us/library/ie/ff975418(v=vs.85).aspx) returns .data of type [CanvasPixelArray](http://msdn.microsoft.com/en-us/library/ie/ff975056(v=vs.85).aspx) which does not have method *set*

Thus, in my PR I use dumb _for(i++)_ method if *.set()* is **not found**.

P.S. It does not work with _pica.WW=true_, but that's [another story on StackOverflow](http://stackoverflow.com/a/10372280). On IE10+, you should use **eval** - see **fallback 2** in the answer on StackOverflow.