Closed athsx closed 5 years ago
I try to decode a qrcode, but I cannot decode it. it give me a error
NotFoundException
but actully it is a normal qrcode, this is my pic.
that my code:
func DecodeFile(fi string)(string, error) { file, _ := os.Open(fi) img, _, _:= image.Decode(file) // prepare BinaryBitmap bmp, _:= gozxing.NewBinaryBitmapFromImage(img) // decode image result, err := qrcode.NewQRCodeReader().Decode(bmp, nil) if err != nil { return "", err } return result.String(), nil }
That qrcode is distorted. There is 3px width modules and 4px width modules.
This is fixed image:
thank you!!
I try to decode a qrcode, but I cannot decode it. it give me a error
but actully it is a normal qrcode, this is my pic.
that my code: