Skip to content
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

The angle for the image from Camera Shot? #11

Open
uokivan opened this issue Feb 11, 2019 · 6 comments
Open

The angle for the image from Camera Shot? #11

uokivan opened this issue Feb 11, 2019 · 6 comments

Comments

@uokivan
Copy link

uokivan commented Feb 11, 2019

Hi ryanw3bb

Thanks a lot, that is a great toolkit,
but I have a problem,

the following is some code I add:

void CameraShotComplete(Texture2D img, string path)
{
	imagePath = path;
	console.text += "\nCamera shot saved to: " + imagePath;
    Destroy (img);
    StartCoroutine(ShowImage(imagePath));
}


IEnumerator ShowImage(string path)
{
    WWW www = new WWW("file://" + path);
    while (!www.isDone)
        yield return null;
    GameObject image = GameObject.Find("RawImage");
    image.GetComponent<RawImage>().texture = www.texture;
}

When I click the "Camera Shot" button, I can see the photo is a right angle
screenshot_2019-02-11-17-11-43-221_com android camera

but after take the photo, the angle is change....like the following:
screenshot_2019-02-11-17-11-52-075_com itivan photodemo

When I click the "Pick Image" button, the photo also show me the wrong angle...
screenshot_2019-02-11-17-13-17-585_com android documentsui

(By the way, when I open the image from my android phone, the image's angle is right)

Can you tell me how to fix it ?
Thanks a lot

@ryanw3bb
Copy link
Owner

Strange, what device are you taking the photo on, and what version of iOS are you running on it?

@uokivan
Copy link
Author

uokivan commented Feb 12, 2019

Strange, what device are you taking the photo on, and what version of iOS are you running on it?
Dear ryanw3bb

Thanks for your reply,

I test different android phone on my hand

Xiaomi Mi Max3 (china) : wrong angle
Lenovo TAB 3 7 : right angle

@thiagoberardinelli
Copy link

I'm having the same issue..
Using a Xiaomi Redmi 4X I got the right image angle while in a Samsung S7 Edge the image rotates 90 degrees to left (as in @uokivan example).

@uokivan
Copy link
Author

uokivan commented Feb 13, 2019

Samsung Galaxy S6 also got wrong angle

@uokivan
Copy link
Author

uokivan commented Feb 13, 2019

May be the native have so problem,
I saw other people also have the same case
react-native-camera/react-native-camera#1348

@ctykaya
Copy link

ctykaya commented Nov 10, 2019

Same issue with Samsung Galaxy Note 3 Android Version 5.0. How to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants