Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotFoundException: startSize = 0 #24

Closed
childeYin opened this issue Jul 19, 2019 · 5 comments
Closed

NotFoundException: startSize = 0 #24

childeYin opened this issue Jul 19, 2019 · 5 comments

Comments

@childeYin
Copy link

"errVerbose":"NotFoundException: startSize = 0:
qukan-ugc/vendor/github.com/makiuchi-d/gozxing/qrcode/detector.(*FinderPatternFinder).SelectBestPatterns
/data/jenkins/home/workspace/techcenter_content_server-ugc-api/src/qukan-ugc/vendor/github.com/makiuchi-d/gozxing/qrcode/detector/finder_pattern_finder.go:459

@makiuchi-d
Copy link
Owner

makiuchi-d commented Jul 19, 2019

It means that no finder pattern was detected on your image.

@childeYin
Copy link
Author

It means that no finder pattern was detected on your image.

thank you

@childeYin
Copy link
Author

childeYin commented Jul 22, 2019

     image, imageName, err := image.Decode(bytes.NewReader(fileBytes))
if err != nil {
	logger.Logger.Error("qrcode decode failed ", zap.Any("fileBytes len", len(fileBytes)), zap.Any("imageName", imageName), zap.Any("err", err))
	return ""
}
bmp, _ := gozxing.NewBinaryBitmapFromImage(image)

qrReader := qrcode.NewQRCodeReader()
result, err := qrReader.Decode(bmp, nil)

fileBytes len":60503,"imageName":"jpeg","image_max_x":540,"image_max_y":800,"err":"NotFoundException: startSize = 0","errVerbose":"NotFoundException: startSize = 0 【or startSize =2】

@makiuchi-d
Copy link
Owner

The QR-Code must contains three finder patterns.
Why don't you show me THE IMAGE?

@childeYin
Copy link
Author

The QR-Code must contains three finder patterns.
Why don't you show me THE IMAGE?

beacuse, image is online by user send, but offline test, it's ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants