makiuchi-d / gozxing

Port of ZXing (https://github.com/zxing/zxing) core to pure Go.
Other
565 stars 65 forks source link

not support large image #48

Closed RelicOfTesla closed 2 years ago

RelicOfTesla commented 2 years ago

raw qrcode

https://github.com/makiuchi-d/gozxing

when size large then 4000x4000 return "NotFoundException: startSize = x:"

test

RelicOfTesla commented 2 years ago
 ReedSolomonException: Error locator degree does not match number of roots:

test

makiuchi-d commented 2 years ago

The qr-codes in these images are not square (2535x2690 and 2815x2895). That is why they could not be read correctly.

You should keep the aspect ratio when resizing the image. The first qr-code can be read by resizing it to a square. resized

RelicOfTesla commented 2 years ago

ok..."zxing.org" also dose not work... but ZBar can be work...

RelicOfTesla commented 2 years ago

use GlobalHistogramBinarizer was success..

    bmp, err := gozxing.NewBinaryBitmap(gozxing.NewGlobalHistgramBinarizer(gozxing.NewLuminanceSourceFromImage(img)))
        qrcode.NewQRCodeReader().Decode(bmp, nil)