codebude / QRCoder

A pure C# Open Source QR Code implementation
MIT License
4.43k stars 1.08k forks source link

Issue was in the last digit of QR Code. It was showing (. * - + and Sometimes X Y A B Z). The String is M*******7202 * is as Character. #535

Closed AshishExo closed 2 days ago

AshishExo commented 1 month ago

Type of issue

Issue was in the last digit of QR Code. It was showing (. * - + and Sometimes X Y A B Z). The String is M*****7202 * is as Character.**

How to solve this type issue??

QRCodeGenerator qrGenerator = new QRCodeGenerator(); QRCodeGenerator.QRCode qrCode = qrGenerator.CreateQrCode(code, QRCodeGenerator.ECCLevel.Q); System.Web.UI.WebControls.Image imgBarCode = new System.Web.UI.WebControls.Image(); imgBarCode.Height = 950; imgBarCode.Width = 950; using (Bitmap bitMap = qrCode.GetGraphic(20)) { using (MemoryStream ms = new MemoryStream()) { bitMap.Save(ms, System.Drawing.Imaging.ImageFormat.Png); byte[] byteImage = ms.ToArray(); imgBarCode.ImageUrl = "data:image/png;base64," + Convert.ToBase64String(byteImage); } plBarCode.Controls.Add(imgBarCode);

    }

I am using the same code to generate the placard.

image

Using this version.

codebude commented 1 month ago

Please use the current release (1.5.1). Version 1.0 is really, really old. From where did you get it?

Besides that: can you please upload one of the broken QR code images? I like to analyze it in detail.

codebude commented 1 month ago

Tested with the current release and couldn't reproduce the error. @AshishExo please confirm, that the current release solves your problem. (You can grab the current version via Nuget: https://www.nuget.org/packages/QRCoder)

codebude commented 2 days ago

Closed issue due to lack of feedback. Feel free to re-open if the error still occurs with the latest release.