parseCodeResult

fun parseCodeResult(bitmapPath: String, reqWidth: Int = DEFAULT_REQ_WIDTH, reqHeight: Int = DEFAULT_REQ_HEIGHT, hints: Map<DecodeHintType, Any>? = DecodeFormatManager.ALL_HINTS): Result?

解析一维码/二维码图片路径,返回 Result

Return

解析结果,失败返回 null

Parameters

bitmapPath

需要解析的图片路径。

reqWidth

请求目标宽度。

reqHeight

请求目标高度。

hints

解析编码类型配置。


fun parseCodeResult(bitmap: Bitmap, hints: Map<DecodeHintType, Any>? = DecodeFormatManager.ALL_HINTS): Result?

解析一维码/二维码位图,返回 Result

Return

解析结果,失败返回 null

Parameters

bitmap

需要解析的位图。

hints

解析编码类型配置。


fun parseCodeResult(source: LuminanceSource?, hints: Map<DecodeHintType, Any>? = DecodeFormatManager.ALL_HINTS): Result?

解析一维码/二维码亮度源,返回 Result

解析策略会按如下顺序尝试:

  1. 原图;2) 反色图;3) 支持旋转时的逆时针旋转图。

Return

解析结果,失败返回 null

Parameters

source

亮度源。

hints

解析编码类型配置。