GenericError when creating certain QR Codes

Discussions about barcode reading and writing
Post Reply
acl
Posts: 19
Joined: Wed Oct 03, 2012 7:52 am

GenericError when creating certain QR Codes

Post by acl » Fri Feb 03, 2017 6:06 pm

Hi,

we are experiencing random problems since we switched to GdPicture generated QR Codes.

The following strings produce an error, when we try to generate a QR Code for them: "XV 068KWU98265743", "FC 468XGJ12904250", "GO 359DAJ94366606", "JX 419TPJ81182933", "WY 625DJN16336771", "KX 002AET53587905", "PO 682UHA01218105", "IY 368LIW15828283", "AJ 703KMC45691816", "OO 645YCV87079367", "GJ 802XER79431857".

What happens is that the BarcodeQRWrite function sets GetStat to GdPictureStatus.GenericError. Moreover, the debug output window in Visual Studio shows that an IndexOutOfRange Exception is thrown somewhere inside GdPicture.

Here is code to reproduce the error:

Code: Select all

        Dim data = "XV 068KWU98265743" 

        Using imagingApi As New GdPicture9.GdPictureImaging
            Dim size = imagingApi.BarcodeQRGetSize(data.ToUpper, GdPicture9.BarcodeQREncodingMode.BarcodeQREncodingModeAlphaNumeric, GdPicture9.BarcodeQRErrorCorrectionLevel.BarcodeQRErrorCorrectionLevelH, 0, 0, 10)
            Dim imageId = imagingApi.CreateNewGdPictureImage(size, size, Drawing.Imaging.PixelFormat.Format24bppRgb, Drawing.Color.White)
            If imagingApi.BarcodeQRWrite(imageId,
                                  data.ToUpper,
                                  GdPicture9.BarcodeQREncodingMode.BarcodeQREncodingModeAlphaNumeric,
                                  GdPicture9.BarcodeQRErrorCorrectionLevel.BarcodeQRErrorCorrectionLevelH,
                                  0, 0, 10,
                                  0, 0, 0,
                                  Drawing.Color.Black,
                                  Drawing.Color.White) <> GdPicture9.GdPictureStatus.OK _
               OrElse imagingApi.GetStat <> GdPicture9.GdPictureStatus.OK Then
                Debugger.Break()
            End If
            imagingApi.ReleaseGdPictureImage(imageId)
        End Using
Please let me know whether this is a Bug in GdPicture or whether there is a problem in our use of the GdPicture API.

Best,

acl

Costinel
Posts: 36
Joined: Mon Jul 11, 2016 9:35 am

Re: GenericError when creating certain QR Codes

Post by Costinel » Mon Feb 06, 2017 9:49 am

Hi,

Thank you for pointing this to us.
The behavior was reproduced by our development team. I will let you know when a fix will be available for update.

Best regards,
Costinel Mitrea

Costinel
Posts: 36
Joined: Mon Jul 11, 2016 9:35 am

Re: GenericError when creating certain QR Codes

Post by Costinel » Mon Apr 24, 2017 1:47 pm

Hi,

A fix for this issue was implemented in GdPicture, please update to the latest release.

Best regards,
Costinel

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest