mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 03:28:52 +01:00
fix mms image compression bug not compressing
This commit is contained in:
@@ -429,8 +429,8 @@ class MessageRepositoryImpl @Inject constructor(
|
||||
|
||||
attempts++
|
||||
scaledBytes = when (attachment.getType(context) == "image/gif") {
|
||||
true -> ImageUtils.getScaledGif(context, attachment.getUri(), maxWidth, maxHeight)
|
||||
false -> ImageUtils.getScaledImage(context, attachment.getUri(), maxWidth, maxHeight)
|
||||
true -> ImageUtils.getScaledGif(context, attachment.getUri(), newWidth, newHeight)
|
||||
false -> ImageUtils.getScaledImage(context, attachment.getUri(), newWidth, newHeight)
|
||||
}
|
||||
|
||||
Timber.d("Compression attempt $attempts: ${scaledBytes.size / 1024}/${maxBytes.toInt() / 1024}Kb ($width*$height -> $newWidth*$newHeight)")
|
||||
|
||||
Reference in New Issue
Block a user