Compress thumbnail: change Jpeg quality from 100 to 80 (#3396)

This commit is contained in:
Benoit Marty 2021-05-27 18:42:07 +02:00
parent d2fd652fb5
commit 302e29831e
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.setDataSource(context, attachment.queryUri)
mediaMetadataRetriever.frameAtTime?.let { thumbnail -> mediaMetadataRetriever.frameAtTime?.let { thumbnail ->
val outputStream = ByteArrayOutputStream() val outputStream = ByteArrayOutputStream()
thumbnail.compress(Bitmap.CompressFormat.JPEG, 100, outputStream) thumbnail.compress(Bitmap.CompressFormat.JPEG, 80, outputStream)
val thumbnailWidth = thumbnail.width val thumbnailWidth = thumbnail.width
val thumbnailHeight = thumbnail.height val thumbnailHeight = thumbnail.height
val thumbnailSize = outputStream.size() val thumbnailSize = outputStream.size()

View File

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