Closed arpitalopa closed 4 years ago
not fixed
I'm also having the same problem.
Why is the issue closed?
@onurzorluer ??
I think this problem caused by images EXIF Data. Did you try remove it? @eminx @arpitalopa
Having the same issue. Any work-arounds?
I think this problem caused by images EXIF Data. Did you try remove it? @eminx @arpitalopa
@alexvirga
@onurzorluer currently, i am not working on it
@arpitalopa any update?
is going to read the exif orientation and rotate the image automatically?
Yep, I think this is happening.
I have the same issue :( Maybe the description can help you. It just happened on the iPhone with the front camera. I put rotation property 0 but it is not working in this case.
EDIT:
I did a bit more testing and it appears that the problem is browser related. Different browser, Chrome and Samsung one, does things differently. So just to describe what I am doing:
I receive images via phone camera. Usually those can be rotated with EXIF for a rotation to be set accordingly to 0,90, 180, 270... I want to have all of my pictures with rotation 0. So I check EXIF of the image and got a value 0,90, 180 or 270 returned. Then I pass the image with the rotation, found in a previous step, too the imageFileResizer
. Problem is that Samsung browser does what I need but Chrome is rotating the image overshooting the rotation. When I implement tthe fix to alway pass rotation 0 together with the image Chrome is working but Samsung is broken.
~What I have observed is that couple of weeks ago the behaviour changed.~
~What I believe was happening in the past is that the EXIF rotation data was ignored and I was extracting it in a separate function and then passed the result to the imageFileResizer
as a rotation
so mine images got zero orientation as expected.~
~But now it stoped working. The images that have any rotation get extra rotation applied to it. So what I think is happening is this: The EXIF is no longer ignored and the image is automatically zeroed and then the rotation I am passing to the imageFileResizer
is applied resulting in the rotated image.~
What is not helping that readme has two conflicting statements about rotation:
So there is a possibility that something have changed in a behaviour outside of the scope of react-image-file-resizer
but I am not sure where.
Hope it makes sense.
@kocur4d As I was said I checked it on a lot of phones such as iPhone, Xiaomi, Samsung, ... but just on the iPhone, this happened. I set rotation prop 0 but it rotates 180degree.
OK, so mine problem was fixed by implementing this:
In the end it was browser related and support for image-orientation
. I am not sure how related it is to other people issues in this thread.
I'm not totally sure, but I have a very strong feeling that this is due to the phone camera orientation thing. Often when we have taken a photo, perhaps it's saved as portrait whereas user thinks it's landscape. So it may have nothing to do with this module.
A rotator may be necessary... Not sure.
OK, so mine problem was fixed by implementing this:
In the end it was browser related and support for
image-orientation
. I am not sure how related it is to other people issues in this thread.
I think what you say is in line with my opinion. Perhaps a PR on that regard??
I have developed a new module for exif orientation resetting. I think it will fix your problem.
Try & give a feedback please: https://github.com/onurzorluer/exif-auto-rotate @arpitalopa @alexvirga @eminx @oggktlmr @emma-adams-machine @kocur4d
Some Images are getting rotated inspite of rotate is 0.