commit a4886051f6d9b0106ca116365bbc73296d6ab21a
parent afc74f27519cdd3677dead1b5214cba341f4b4ca
Author: Bohdan Potuzhnyi <bohdan.potuzhnyi@gmail.com>
Date: Sun, 11 May 2025 17:37:55 +0200
[pos] some small fixes of comments
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigFragment.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigFragment.kt
@@ -371,14 +371,14 @@ class ConfigFragment : Fragment() {
false
)
- // 3) (Optional) rotate the source if your sensor’s orientation needs it
+ //Rotate the image
val rotated = when (proxy.imageInfo.rotationDegrees) {
90 -> source.rotateCounterClockwise()
270 -> source.rotateCounterClockwise()
else -> source
}
- // 4) Try to decode
+ // 3) Try to decode
val bitmap = BinaryBitmap(HybridBinarizer(rotated))
try {
val result = qrReader.decodeWithState(bitmap)
@@ -404,7 +404,6 @@ class ConfigFragment : Fragment() {
}, cameraExecutor)
}
- // 3) convert YUV_420_888 to NV21
private fun yuv420888ToNv21(image: Image): ByteArray {
val yPlane = image.planes[0].buffer
val uPlane = image.planes[1].buffer