From 302e29831e74487d8d83d9982e7b5acd0d4d9f55 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 27 May 2021 18:42:07 +0200 Subject: [PATCH] Compress thumbnail: change Jpeg quality from 100 to 80 (#3396) --- .../android/sdk/internal/session/content/ThumbnailExtractor.kt | 2 +- newsfragment/3396.feature | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 newsfragment/3396.feature diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/content/ThumbnailExtractor.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/content/ThumbnailExtractor.kt index fde3dd906c..82cd682eae 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/content/ThumbnailExtractor.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/content/ThumbnailExtractor.kt @@ -52,7 +52,7 @@ internal class ThumbnailExtractor @Inject constructor( mediaMetadataRetriever.setDataSource(context, attachment.queryUri) mediaMetadataRetriever.frameAtTime?.let { thumbnail -> val outputStream = ByteArrayOutputStream() - thumbnail.compress(Bitmap.CompressFormat.JPEG, 100, outputStream) + thumbnail.compress(Bitmap.CompressFormat.JPEG, 80, outputStream) val thumbnailWidth = thumbnail.width val thumbnailHeight = thumbnail.height val thumbnailSize = outputStream.size() diff --git a/newsfragment/3396.feature b/newsfragment/3396.feature new file mode 100644 index 0000000000..29ae6422bf --- /dev/null +++ b/newsfragment/3396.feature @@ -0,0 +1 @@ +Compress thumbnail: change Jpeg quality from 100 to 80 \ No newline at end of file