mirror of
https://github.com/status-im/react-native-image-resizer.git
synced 2025-02-05 11:23:21 +00:00
Always rotate the image with the proper up orientation on Android (#42)
This commit is contained in:
parent
fff95be7c2
commit
ab1a39bf54
@ -226,11 +226,9 @@ class ImageResizer {
|
||||
|
||||
// Rotate if necessary
|
||||
Bitmap rotatedImage = scaledImage;
|
||||
if (rotation != 0) {
|
||||
int orientation = getOrientation(context, Uri.parse(imagePath));
|
||||
rotation = orientation + rotation;
|
||||
rotatedImage = ImageResizer.rotateImage(scaledImage, rotation);
|
||||
}
|
||||
int orientation = getOrientation(context, Uri.parse(imagePath));
|
||||
rotation = orientation + rotation;
|
||||
rotatedImage = ImageResizer.rotateImage(scaledImage, rotation);
|
||||
|
||||
if (scaledImage != rotatedImage) {
|
||||
scaledImage.recycle();
|
||||
|
Loading…
x
Reference in New Issue
Block a user