|
18楼

楼主 |
发表于 2021-11-6 22:31:39
|
只看该作者
江苏省连云港市
小更新以下,感谢6、7楼建议,
二维码创建支持返回字节集
二维码识别支持传入字节集,并返回坐标
进一步简化封装,详见置顶楼
Demo2.zip
(632.67 KB, 下载次数: 833)
|
EncodeToFile | 逻辑型 | | |
text | 文本型 | | | | filePath | 文本型 | | | | width | 整数型 | | | | height | 整数型 | | | | margin | 整数型 | | | | eccLevel | 整数型 | | | |
width = 选择 (是否为空 (width ), 500, width )height = 选择 (是否为空 (height ), 500, height )margin = 选择 (是否为空 (margin ), 20, margin )eccLevel = 选择 (是否为空 (eccLevel ), -1, eccLevel )返回 (QrEncodeToFile (text, filePath, width, height, margin, eccLevel ) > 0 )|
EncodeToMemory | 字节集 | | |
text | 文本型 | | | | width | 整数型 | | | | height | 整数型 | | | | margin | 整数型 | | | | eccLevel | 整数型 | | | |
变量名 | 类 型 | 静态 | 数组 | 备 注 | png | 字节集 | | | len | 整数型 | | |
width = 选择 (是否为空 (width ), 500, width )height = 选择 (是否为空 (height ), 500, height )margin = 选择 (是否为空 (margin ), 20, margin )eccLevel = 选择 (是否为空 (eccLevel ), -1, eccLevel )png = 取空白字节集 (20480 )len = QrEncodeToMemory (text, png, width, height, margin, eccLevel ) 如果 (len > 0 )返回 (取字节集左边 (png, len )) 返回 ({ }) |
DecodeFromFile | 文本型 | | |
filePath | 文本型 | | | | angleEscape | 逻辑型 | | | | postion | Position | | | | 返回 (QrDecodeFromFile (filePath, angleEscape, postion )) |
DecodeFromMemory | 文本型 | | |
imageData | 字节集 | | | | angleEscape | 逻辑型 | | | | postion | Position | | | | 返回 (QrDecodeFromMemory (imageData, 取字节集长度 (imageData ), angleEscape, postion )) |
|