mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Calculate video output size taking into account portrait mode (#5068)
This commit is contained in:
committed by
GitHub
parent
7c982a30cb
commit
33aa7a914f
+1
-1
@@ -64,7 +64,7 @@ fun BitmapFactory.Options.calculateInSampleSize(desiredWidth: Int, desiredHeight
|
||||
* Decodes the [inputStream] into a [Bitmap] and applies the needed rotation based on [orientation].
|
||||
* This orientation value must be one of `ExifInterface.ORIENTATION_*` constants.
|
||||
*/
|
||||
fun Bitmap.rotateToMetadataOrientation(orientation: Int): Bitmap {
|
||||
fun Bitmap.rotateToExifMetadataOrientation(orientation: Int): Bitmap {
|
||||
val matrix = Matrix()
|
||||
when (orientation) {
|
||||
ExifInterface.ORIENTATION_ROTATE_270 -> matrix.postRotate(270f)
|
||||
|
||||
Reference in New Issue
Block a user