Closed miltonlaufer closed 7 years ago
Indeed! I just noticed that GPano:UsePanoramaViewer
is not required, so it may be missing. GPano:ProjectionType
is required and it is currently only used with the value equirectangular
. By checking for the presence (not None
) we can assume the photo is intended to be displayed as panorama. But we don't know if ever more values will be added. Since PhotoSphere.js supports only equirectangular projection, I'd rather check for that exact value.
def use_panorama_viewer(self, filepath):
metadata = GExiv2.Metadata(filepath)
return metadata.get_tag_string('Xmp.GPano.ProjectionType') == 'equirectangular' \
and metadata.get_tag_string('Xmp.GPano.UsePanoramaViewer') != 'False'
Does this make sense?
Yes, that's a better solution than mine. Mostly because if the image is meant to be viewed on a different kind of projection, it would look very weird. About the GPano.UsePanoramaViewer: I haven't seen any image with that property set as "False", but I guess is better to have that just in case.
Thank you for the quick reply!
Hi! Thank you for this plugin, it is very useful!
I was having problems with my Samsung Gear 360 photos, so I changed line 133 of eog_panorama.py to
return metadata.get_tag_string('Xmp.GPano.ProjectionType') is not None
This works better and I'm not having problems with normal photos.
Best!