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

Use EXIF to determine photo orientation #49

Closed
siccovansas opened this issue May 29, 2020 · 7 comments
Closed

Use EXIF to determine photo orientation #49

siccovansas opened this issue May 29, 2020 · 7 comments

Comments

@siccovansas
Copy link

When you create a panorama/photo sphere using a smartphone, depending on your phones orientation while capturing the image, you can end up with an image that is stored 'upside down', but the EXIF should state that. Currently this app seems to not process this information, so some of my panoramas are shown upside down. Could this be fixed?

Awesome app by the way!

@R0Wi
Copy link
Member

R0Wi commented May 29, 2020

Hi @siccovansas, thanks for your feedback. Since the app only integrates the Photosphere Viewer JS library, which is then responsible for showing the image, i'm afraid there's not much we can do here. Like discussed in #1 an option might be to update the component to version 4 which is now released (currently we're using version 3). But i don't know if the viewer supports the desired functionallity then. If you're okay with that you could provide some sample-data and i'll try?

@siccovansas
Copy link
Author

siccovansas commented May 29, 2020

Hi @R0Wi, thanks for your reply! Here is an example image that is shown upside down: https://we.tl/t-4gmfXk2ovp (the image is larger than GitHub's 10MB attachment limit, so I needed to use an external service)

@R0Wi
Copy link
Member

R0Wi commented May 29, 2020

Hi @R0Wi, thanks for your reply! Here is an example image that is shown up side down: https://we.tl/t-4gmfXk2ovp (the image is larger than GitHub's 10MB attachment limit, so I needed to use an external service)

Thanks for the sample. I did a quick setup with the PhotosphereViewer component like described here. Unfortunately i got the following warnings in the browser console and the screen stays black:

psv.js:11 PhotoSphereViewer: invalid XMP data

three.min.js:131 WebGL: INVALID_VALUE: texImage2D: bad image data
[.WebGL-0x3c3319f0e300]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.

So it seems that the viewer has problems showing your specific image because of it's metadata. I extracted the XMP-metadata of your image and it looks like this:

<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
 <rdf:Description rdf:about="" xmlns:GPano="http://ns.google.com/photos/1.0/panorama/" 
GPano:ProjectionType="cylindrical"
GPano:CroppedAreaImageWidthPixels="12896" 
GPano:CroppedAreaImageHeightPixels="3824" 
GPano:FullPanoWidthPixels="23800" 
GPano:CroppedAreaLeftPixels="5452" 
GPano:CroppedAreaTopPixels="-1912"/> 
</rdf:RDF> 
</x:xmpmeta>

I'm not an absolute XMP expert but what i can say is that the ProjectionType of my images is usally equirectangular. Also negative CroppedAreaTopPixels looks a bit strange. Maybe you could ask the developers of Photosphere Viewer JS for help here and add a link to this issue?

@siccovansas
Copy link
Author

Thanks for looking into it! I'll open an issue at the Photosphere Viewer JS repo and link back to here 👍

@R0Wi
Copy link
Member

R0Wi commented May 29, 2020

Closing this for now. Please reopen if the app itself can help to overcome the issue.

@R0Wi R0Wi closed this as completed May 29, 2020
@siccovansas
Copy link
Author

Over at Photosphere Viewer JS they don't see any issues with the image, so I guess that version 4 fixes it.

@siccovansas
Copy link
Author

Woops, I misunderstood. Apparently version 4 doesn't fix it and my image seems to be the problem. Nothing you can do then :)

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

2 participants