二维码 ThoughtWorks.QRCode 之 index was outside bounds of the array
来源:互联网 发布:mac怎么输入法 编辑:程序博客网 时间:2024/06/03 16:42
最近在使用ThoughtWorks.QRCode过程中,单独生成一个二维码没有出现过问题,在重复利用QRCodeEncoder生成二维码的过程中,会出现index was outside bounds of the array错误。
经过调试分析,给出两种解决方案:
- 在生成每一个二维码图片前,重新new 一个QRCodeEncoder对象;
- 在批量生成二维码图片时,在生成每一个二维码图片前,将QRCodeEncoder实例的QRCodeVersion属性赋值为0;
PS:在使用过程中,QRCodeEncoder实例会自动将QRCodeVersion值进行修改,如果不重新赋值为0,有时候就会出现index was outside bounds of the array错误。暂时没发现造成这个问题的原因,但可以用方法1和2来避免这个问题。
ThoughtWorks.QRCode的具体使用可参考:
QRCODE使用实例
此问题的解决参考:
Stack Overflow
0 0
- 二维码 ThoughtWorks.QRCode 之 index was outside bounds of the array
- Index was outside the bounds of the array.错误解决
- Index was outside the bounds of the array.
- SQL Azure Index was outside the bounds of the array Microsoft.SqlServer.Smo
- .NET Web Deployment Project 编译错误An error occurred when merging assemblies: Index was outside the bounds of the array解决办法
- ThoughtWorks.QRCode生成二维码
- c# ThoughtWorks.QRCode 二维码
- 使用ThoughtWorks.QRCode生成二维码
- 请问:二维码ThoughtWorks.QRCode是开源的吗?
- .NET 二维码生成(ThoughtWorks.QRCode)
- .NET 二维码生成(ThoughtWorks.QRCode)
- 通过ThoughtWorks.QRCode和ZXing识别二维码
- 二维码 ThoughtWorks.QRCode 简单使用实例
- unity各种报错之:Mesh.colors is out of bounds. The supplied array needs ...
- 二维码生成与解析 (使用ThoughtWorks.QRCode)
- C#利用ThoughtWorks.QRCode.dll创建和解析二维码
- C# 生成二维码 两种方式ThoughtWorks.QRCode ZXing
- C#调用ThoughtWorks.QRCode.dll生成带参数二维码
- 最大连续数列的和
- MySql数据库优化
- 40G应用下的三种光器件介绍
- 设置ImageLoader的图片缓存
- python调参神器hyperopt
- 二维码 ThoughtWorks.QRCode 之 index was outside bounds of the array
- CRTP 奇异递归模板模式
- MemCache超详细解读
- 在Java中使用Jedis操作Redis,在高并发的情况下,应用卡死、报无法获取连接错误的处理方式
- 字典序
- Android:关于mediacodec编码camera yuv数据帧率过低的问题
- webpack入门
- leetcode-150-Evaluate Reverse Polish Notation
- Codeforces 557B Pasha and Tea【二分+思维】