From 53c443868a8c762c2033114a6f306ae0d81afef5 Mon Sep 17 00:00:00 2001 From: Pavel Poley Date: Thu, 28 Apr 2022 12:56:04 +0300 Subject: [PATCH] fix #760 changed/added contact photo has always low resolution --- .../contacts/pro/helpers/LocalContactsHelper.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/LocalContactsHelper.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/LocalContactsHelper.kt index 3a34b473..a7a4b33f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/LocalContactsHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/LocalContactsHelper.kt @@ -79,11 +79,10 @@ class LocalContactsHelper(val context: Context) { val photoUri = Uri.parse(uri) val bitmap = MediaStore.Images.Media.getBitmap(context.contentResolver, photoUri) - val thumbnailSize = context.getPhotoThumbnailSize() - val scaledPhoto = Bitmap.createScaledBitmap(bitmap, thumbnailSize * 2, thumbnailSize * 2, false) - val scaledSizePhotoData = scaledPhoto.getByteArray() - scaledPhoto.recycle() - return scaledSizePhotoData + val fullSizePhotoData = bitmap.getByteArray() + bitmap.recycle() + + return fullSizePhotoData } private fun convertLocalContactToContact(localContact: LocalContact?, storedGroups: ArrayList): Contact? {