From 191a47b9750ef815d1f0e30df93f8c8260a1c3f4 Mon Sep 17 00:00:00 2001 From: Hans Date: Tue, 31 Dec 2024 01:56:00 +0800 Subject: [PATCH] fix(Android): correct implement --- android/src/main/java/com/tscprinter/TscCommonModule.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/java/com/tscprinter/TscCommonModule.kt b/android/src/main/java/com/tscprinter/TscCommonModule.kt index 4e1c1a7..cbdafad 100644 --- a/android/src/main/java/com/tscprinter/TscCommonModule.kt +++ b/android/src/main/java/com/tscprinter/TscCommonModule.kt @@ -28,7 +28,7 @@ class TscCommonModule(reactContext: ReactApplicationContext) : try { val url = URL(uri) val bitmap = BitmapFactory.decodeStream(url.openStream()) - val resizedBitmap = if (width == 0 || height == 0) { + val resizedBitmap = if (width == 0.0 || height == 0.0) { bitmap } else { Bitmap.createScaledBitmap(bitmap, width.toInt(), height.toInt(), true)