Skip to content

Commit

Permalink
fix compare share
Browse files Browse the repository at this point in the history
  • Loading branch information
T8RIN committed Aug 28, 2023
1 parent 5740edc commit 0c5ed98
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,15 @@ class CompareViewModel @Inject constructor(
val image = this
val finalBitmap = Bitmap.createBitmap(image.width, image.height, image.config)
val canvas = android.graphics.Canvas(finalBitmap)
canvas.drawBitmap(image, Matrix(), null)
canvas.drawBitmap(overlay, Matrix(), null)
kotlin.runCatching {
canvas.drawBitmap(
Bitmap.createBitmap(
overlay,
image,
0,
0,
(width * percent / 100).roundToInt(),
height
(image.width * percent / 100).roundToInt(),
image.height
), 0f, 0f, null
)
}
Expand Down

0 comments on commit 0c5ed98

Please sign in to comment.