diff options
author | dan <dan.abramov@gmail.com> | 2024-11-01 19:25:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-01 19:25:31 +0000 |
commit | ff01ffe35f97642e4b41b7d8cee43b492a33ed45 (patch) | |
tree | 6603eee7f31feedad55b71a889f67c9aeb3fc29e /patches | |
parent | 5c5fc3230b45abc2946d8c3a45a1336e65478edd (diff) | |
download | voidsky-ff01ffe35f97642e4b41b7d8cee43b492a33ed45.tar.zst |
Fix some images getting squished on Android due to EXIF tags (#6058)
Diffstat (limited to 'patches')
-rw-r--r-- | patches/expo-image-picker+15.0.5.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/patches/expo-image-picker+15.0.5.patch b/patches/expo-image-picker+15.0.5.patch new file mode 100644 index 000000000..962b36612 --- /dev/null +++ b/patches/expo-image-picker+15.0.5.patch @@ -0,0 +1,18 @@ +diff --git a/node_modules/expo-image-picker/android/src/main/java/expo/modules/imagepicker/exporters/RawImageExporter.kt b/node_modules/expo-image-picker/android/src/main/java/expo/modules/imagepicker/exporters/RawImageExporter.kt +index f339e5f..fa35e82 100644 +--- a/node_modules/expo-image-picker/android/src/main/java/expo/modules/imagepicker/exporters/RawImageExporter.kt ++++ b/node_modules/expo-image-picker/android/src/main/java/expo/modules/imagepicker/exporters/RawImageExporter.kt +@@ -16,7 +16,12 @@ class RawImageExporter : ImageExporter { + copyFile(source, output, contentResolver) + val exifInterface = ExifInterface(output.absolutePath) + val imageRotation = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION, 0) +- val isRotatedLandscape = (imageRotation == ExifInterface.ORIENTATION_ROTATE_90 || imageRotation == ExifInterface.ORIENTATION_ROTATE_270) ++ val isRotatedLandscape = ( ++ imageRotation == ExifInterface.ORIENTATION_ROTATE_90 || ++ imageRotation == ExifInterface.ORIENTATION_ROTATE_270 || ++ imageRotation == ExifInterface.ORIENTATION_TRANSPOSE || ++ imageRotation == ExifInterface.ORIENTATION_TRANSVERSE ++ ) + val options = BitmapFactory.Options().apply { inJustDecodeBounds = true } + + BitmapFactory.decodeFile(output.absolutePath, options) |