From 537c1f70113ef499dbdd42e0a7e3bb2a60e572f0 Mon Sep 17 00:00:00 2001 From: minikupa Date: Tue, 14 Jan 2020 15:50:14 +0900 Subject: [PATCH] Update BitmapCompressExt.kt add webp --- .../com/example/flutterimagecompress/ext/BitmapCompressExt.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/src/main/kotlin/com/example/flutterimagecompress/ext/BitmapCompressExt.kt b/android/src/main/kotlin/com/example/flutterimagecompress/ext/BitmapCompressExt.kt index 0a9e4c2..7737c2c 100644 --- a/android/src/main/kotlin/com/example/flutterimagecompress/ext/BitmapCompressExt.kt +++ b/android/src/main/kotlin/com/example/flutterimagecompress/ext/BitmapCompressExt.kt @@ -67,5 +67,5 @@ fun Bitmap.calcScale(minWidth: Int, minHeight: Int): Float { } fun convertFormatIndexToFormat(type: Int): Bitmap.CompressFormat { - return if (type == 1) Bitmap.CompressFormat.PNG else Bitmap.CompressFormat.JPEG -} \ No newline at end of file + return if (type == 1) Bitmap.CompressFormat.PNG else if (type == 3) Bitmap.CompressFormat.WEBP else Bitmap.CompressFormat.JPEG +}