obrassard/shc-extractor

pngjs fails to read BC vaccine card QR codes

christopher0936 opened this issue · 5 comments

Isolated issue to the call to the PNG library to that defines imageData.

PNG fails to read the image and throws error "unrecognised content at end of stream"

If you crop the image down to just the QR code it should work. But I agree it would be nice if it worked with the whole image.

👋 Hello, I don't think I'll have time to work on it for a while, so if any of you want to try to improve this, I encourage you to do it!

Isolated issue to the call to the PNG library to that defines imageData.

PNG fails to read the image and throws error "unrecognised content at end of stream"

Did some testing, this is actually what happens when you upload something other than a png. Convert your image to png and it should work fine.

@kjalen PR's #8 Improved the error message related to this issue.
But I will keep it open in case someone wants to improve the QR code identification in the more complex images and/or to add support for other image types

Closing this since #6 add support for BC qr codes