Skip to content

Commit 8fda214

Browse files
committed
code refactor
1 parent 208b148 commit 8fda214

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/data/src/main/java/ru/tech/imageresizershrinker/core/data/image/AndroidImageCompressor.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ internal class AndroidImageCompressor @Inject constructor(
7676
imageFormat: ImageFormat,
7777
quality: Quality
7878
): ByteArray = withContext(encodingDispatcher) {
79-
val image = image.toSoftware().let {
79+
val transformedImage = image.toSoftware().let {
8080
if (imageFormat !in ImageFormat.alphaContainedEntries) {
8181
withContext(defaultDispatcher) {
8282
Trickle.drawColorBehind(
@@ -94,7 +94,7 @@ internal class AndroidImageCompressor @Inject constructor(
9494
imageScaler = imageScaler
9595
)
9696
.compress(
97-
image = image,
97+
image = transformedImage,
9898
quality = quality.coerceIn(imageFormat)
9999
)
100100
}

0 commit comments

Comments
 (0)