After quite some debugging I think I have found a problem in the JS porting of the Java code. The Java code calls "new Detector(image.getBlackMatrix())" whereas the JS code calls (effecitvley) "new Detector(qrcode.grayScaleToBitmap(qrcode.grayscale())". This difference in code seems to cause the source data of the attached image to be incorrect to begin with - thus making the decoded result incorrect.
After quite some debugging I think I have found a problem in the JS porting of the Java code. The Java code calls "new Detector(image.getBlackMatrix())" whereas the JS code calls (effecitvley) "new Detector(qrcode.grayScaleToBitmap(qrcode.grayscale())". This difference in code seems to cause the source data of the attached image to be incorrect to begin with - thus making the decoded result incorrect.