mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-20 12:48:53 +01:00
Avoid unnecessary compression when no message size limit is set
This commit is contained in:
@@ -78,7 +78,7 @@ class SendMessage @Inject constructor(
|
|||||||
val width = src.width
|
val width = src.width
|
||||||
|
|
||||||
val stream = ByteArrayOutputStream()
|
val stream = ByteArrayOutputStream()
|
||||||
src.compress(Bitmap.CompressFormat.JPEG, quality, stream)
|
src.compress(Bitmap.CompressFormat.JPEG, 100, stream)
|
||||||
|
|
||||||
while (maxBytes > 0 && stream.size() > maxBytes) {
|
while (maxBytes > 0 && stream.size() > maxBytes) {
|
||||||
step++
|
step++
|
||||||
|
|||||||
Reference in New Issue
Block a user