react-native-image-resizer: orientation / rotation bug
When I take a photo with Samsung S8 in portrait mode, the camera app tells me orientation is 90.
If I apply this orientation to the resize, the image comes out correct. However, this now breaks every single other device.
Surely the rotate could should look like like this
Bitmap rotatedImage = ImageResizer.rotateImage(scaledImage, rotation);
instead of
Bitmap rotatedImage = scaledImage;
int orientation = getOrientation(context, Uri.parse(imagePath));
rotation = orientation + rotation;
rotatedImage = ImageResizer.rotateImage(scaledImage, rotation);
I cant understand why we would want to rotate by exif orientation PLUS whatever rotation value the user passes in?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 17 (3 by maintainers)
@embpdaniel I ended up coding my own fork, check my commit: https://github.com/antoinerousseau/react-native-image-resizer/commit/e027be074669d5990daf3976957f911abc583e9a