Calculate video output size taking into account portrait mode (#5068)

This commit is contained in:
Jorge Martin Espinosa 2025-07-23 14:19:08 +02:00 committed by GitHub
parent 7c982a30cb
commit 33aa7a914f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 5 deletions

View file

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