You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting 'NoPadding=true', the 'SetPixels32()' method is causing the error 'SetPixels32 called with invalid number of pixels in the array'.
intw=300;inth=300;varoptions=new QrCodeEncodingOptions
{Width=w,Height=h,PureBarcode=false,Margin=0,NoPadding=true};
options.Hints.Add(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);varwriter=new BarcodeWriter
{Format= BarcodeFormat.QR_CODE,Options=options};varpixels= writer.Write(qrCodeData);vartexture=new Texture2D(w, h);
texture.SetPixels32(pixels);// SetPixels32 called with invalid number of pixels in the array
texture.Apply();
The text was updated successfully, but these errors were encountered:
Which version of ZXing.Net do you use? Do you use the assembly from the main package of the release or from the binding package?
If possible you should use the assembly from the binding package. The BarcodeWriter implementation there has a slightly different result which contains the real height and width of the generated image.
...
var color32ImageData = writer.Write(qrCodeData);
var texture = new Texture2D(color32ImageData.Width, color32ImageData.Height);
texture.SetPixels32(color32ImageData.Pixels);
...
When setting 'NoPadding=true', the 'SetPixels32()' method is causing the error 'SetPixels32 called with invalid number of pixels in the array'.
The text was updated successfully, but these errors were encountered: