-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android rotated texture #9
Comments
Oh I think II know what s the fix. We need to modify plugin to return also EXIF data. |
Hi, @eduardhasanaj2 Thanks for reporting the issue! I changed the code to read EXIF and fix rotation with iOS/Android native code before returning it to the Unity side. The patch is also available as a package on Release Fix image rotation · thedoritos/unimgpicker. Try it and please tell us if it worked on your environment. Thank you. |
I updated plugins folder, it do not show anything.
|
About unimgpicker's patch
I could not get what happened.
About your codeIt is hard to say anything without the real code. InputStream exifStream = context.getContentResolver().openInputStream(uri);
float orientation = getOrientation(exifStream, uri);
InputStream inputStream = context.getContentResolver().openInputStream(uri);
// Decode metadata
BitmapFactory.Options opts = new BitmapFactory.Options();
opts.inJustDecodeBounds = true;
BitmapFactory.decodeStream(inputStream, null, opts);
// ... Thank you. |
Sorry I didn't watch your post. I tried your version but when I pick it didnt show inn my tablet.
|
I'm happy to hear that your code worked! :) Let me get it clear. If so, I want merge the query part into You can choose to do it your own and send me a pull request to the branch if you want. That's more than welcome. Thank you. |
I tried again your code and it worked like charm. I recalled that also the version of plugin modified by me was not displaying nothing due to an error in setting aspect ratio.
Nope. Unfortunately I did not see your code in the new version. I was saying that i tried media store query but it didnt work. When i tried it in my code it was returning 0 all the time. I asked you to try to find a device that support it just to test, because some devices do not save exif information so it is needed fallback to cursor. Unfortunately I just downloaded the project repository as zip so I do not know how to merge it. |
Tested the changes on fix/image_rotation. Retrieved the IOS files from the plugin folder on that branch and tested it on IOS 6 and IOS XS. It fixes the rotation upon creating the png. It works. Cheers! |
Hey, thank you for the great tool!
Also, I can see at the commit message that there were issues with the jar. Thanks mate! |
Hi, @richardrevesz. Thx for your feedback! The v2 implementation on BTW, the branch Thank you! |
I see, thank you! For anyone else looking for how to read EXIF data, check out this repo: |
Hi,
First of all thank you for providing this amazing plugin as open source.
It works great and fast but from what I see images are rotated 90 degree. How can I fix this?
Best wishes
The text was updated successfully, but these errors were encountered: