Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix some images getting squished on Android due to EXIF tags (#6058)

authored by

dan and committed by
GitHub
ff01ffe3 5c5fc323

+18
+18
patches/expo-image-picker+15.0.5.patch
··· 1 + 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 2 + index f339e5f..fa35e82 100644 3 + --- a/node_modules/expo-image-picker/android/src/main/java/expo/modules/imagepicker/exporters/RawImageExporter.kt 4 + +++ b/node_modules/expo-image-picker/android/src/main/java/expo/modules/imagepicker/exporters/RawImageExporter.kt 5 + @@ -16,7 +16,12 @@ class RawImageExporter : ImageExporter { 6 + copyFile(source, output, contentResolver) 7 + val exifInterface = ExifInterface(output.absolutePath) 8 + val imageRotation = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION, 0) 9 + - val isRotatedLandscape = (imageRotation == ExifInterface.ORIENTATION_ROTATE_90 || imageRotation == ExifInterface.ORIENTATION_ROTATE_270) 10 + + val isRotatedLandscape = ( 11 + + imageRotation == ExifInterface.ORIENTATION_ROTATE_90 || 12 + + imageRotation == ExifInterface.ORIENTATION_ROTATE_270 || 13 + + imageRotation == ExifInterface.ORIENTATION_TRANSPOSE || 14 + + imageRotation == ExifInterface.ORIENTATION_TRANSVERSE 15 + + ) 16 + val options = BitmapFactory.Options().apply { inJustDecodeBounds = true } 17 + 18 + BitmapFactory.decodeFile(output.absolutePath, options)