make sure the image is rotated as appropriate at third party intents
This commit is contained in:
parent
ff85805636
commit
1f55c1345a
|
@ -74,7 +74,10 @@ class PhotoProcessor(val activity: MainActivity, val saveUri: Uri?, val deviceOr
|
|||
val deviceRot = compensateDeviceRotation(deviceOrientation, isUsingFrontCamera)
|
||||
var image = BitmapFactory.decodeByteArray(data, 0, data.size)
|
||||
val totalRotation = (imageRot + deviceRot + previewRotation) % 360
|
||||
if (activity.isPathOnSD(path) && !isNougatPlus()) {
|
||||
if (path.startsWith(activity.internalStoragePath) || isNougatPlus()) {
|
||||
// do not rotate the image itself in these cases, rotate it by exif only
|
||||
} else {
|
||||
// make sure the image itself is rotated at third party intents
|
||||
image = rotate(image, totalRotation)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue