Merge pull request #3423 from vector-im/feature/bma/compress_thumbnail

Compress thumbnail: change Jpeg quality from 100 to 80 (#3396)
This commit is contained in:
Benoit Marty 2021-05-27 20:53:16 +02:00 committed by GitHub
commit c3a754604f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -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()

View file

@ -0,0 +1 @@
Compress thumbnail: change Jpeg quality from 100 to 80