1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-06-25 21:12:46 +02:00

Removed bug with inproper calls (i.e. float point numbers for sw or sh) to getImageData().

This commit is contained in:
kkapsner 2015-09-02 23:57:31 +02:00
parent 4ed4bb759b
commit 98a15ef9f2

View File

@ -166,6 +166,8 @@
mode: blockMode.readAPI,
object: unsafeWindow.CanvasRenderingContext2D,
fake: function getImageData(sx, sy, sw, sh){
sw = parseInt(sw, 10);
sh = parseInt(sh, 10);
var l = sw * sh * 4;
var data = new Uint8ClampedArray(l);
for (var i = 0; i < l; i += 1){