Closed ghost closed 1 year ago
The illustration on the bottom of the image seems to be noise for binarization.
Trim the image before binarization like this:
img, _, _ := image.Decode(file)
img = img.(interface {
SubImage(image.Rectangle) image.Image
}).SubImage(image.Rect(0, 0, 838, 1800))
bmp, _ := gozxing.NewBinaryBitmapFromImage(img)
IMG: https://i.imgur.com/UoRQWJE.jpg
I got this error from result, err := qrReader.Decode(bmp, nil)