mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-20 21:28:45 +03:00
Use exif info of the image for correct rotation.
This commit is contained in:
parent
d867b1345f
commit
a11d70f173
2 changed files with 10 additions and 0 deletions
|
@ -15,6 +15,7 @@ Bugfix 🐛:
|
||||||
- Account creation: wrongly hints that an email can be used to create an account (#941)
|
- Account creation: wrongly hints that an email can be used to create an account (#941)
|
||||||
- Fix crash in the room directory, when public room has no name (#1023)
|
- Fix crash in the room directory, when public room has no name (#1023)
|
||||||
- Fix restoring keys backup with passphrase (#526)
|
- Fix restoring keys backup with passphrase (#526)
|
||||||
|
- Fix rotation of full-size image (#647)
|
||||||
|
|
||||||
Translations 🗣:
|
Translations 🗣:
|
||||||
-
|
-
|
||||||
|
|
|
@ -25,6 +25,7 @@ import com.bumptech.glide.load.engine.GlideException
|
||||||
import com.bumptech.glide.load.resource.bitmap.RoundedCorners
|
import com.bumptech.glide.load.resource.bitmap.RoundedCorners
|
||||||
import com.bumptech.glide.request.RequestListener
|
import com.bumptech.glide.request.RequestListener
|
||||||
import com.bumptech.glide.request.target.Target
|
import com.bumptech.glide.request.target.Target
|
||||||
|
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView.ORIENTATION_USE_EXIF
|
||||||
import com.github.piasy.biv.view.BigImageView
|
import com.github.piasy.biv.view.BigImageView
|
||||||
import im.vector.matrix.android.api.session.content.ContentUrlResolver
|
import im.vector.matrix.android.api.session.content.ContentUrlResolver
|
||||||
import im.vector.matrix.android.internal.crypto.attachments.ElementToDecrypt
|
import im.vector.matrix.android.internal.crypto.attachments.ElementToDecrypt
|
||||||
|
@ -36,6 +37,7 @@ import im.vector.riotx.core.utils.DimensionConverter
|
||||||
import im.vector.riotx.core.utils.isLocalFile
|
import im.vector.riotx.core.utils.isLocalFile
|
||||||
import kotlinx.android.parcel.Parcelize
|
import kotlinx.android.parcel.Parcelize
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
|
import java.io.File
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import kotlin.math.min
|
import kotlin.math.min
|
||||||
|
|
||||||
|
@ -142,6 +144,13 @@ class ImageContentRenderer @Inject constructor(private val activeSessionHolder:
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
imageView.setImageLoaderCallback(object: DefaultImageLoaderCallback {
|
||||||
|
override fun onSuccess(image: File?) {
|
||||||
|
super.onSuccess(image)
|
||||||
|
imageView.ssiv.orientation = ORIENTATION_USE_EXIF
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
imageView.showImage(
|
imageView.showImage(
|
||||||
Uri.parse(thumbnail),
|
Uri.parse(thumbnail),
|
||||||
Uri.parse(fullSize)
|
Uri.parse(fullSize)
|
||||||
|
|
Loading…
Add table
Reference in a new issue