While using the BMPLoader module to quickly get some data out to a display without having to port my Python graphics library across, I found it was giving me an error: w is not defined etc...
The only reference to 'w' in BMPLoader is in the line of code below
img.buffer.set(new Uint8Array(bmp, addr+istride*(img.height-(y+1)), w), ostride*y);
changing it to
img.buffer.set(new Uint8Array(bmp, addr+istride*(img.height-(y+1)), this.width), ostride*y);
fixes the problem. I just copied the module code into my program and converted it to a standard function then made the changes above but it would be handy if the module could be updated.