Photo sphere image upload validation

221 views Asked by At


I'm trying to make my photo sphere gallery with MVC C#. Is there any way to test an image that is a real sphere image? A library or something? I'm currently having an upload button and I save the image's path in the Database. But I would like to validate the image that it is a real sphere image. I was searching for hours but no luck...
Thank you!

1

There are 1 answers

0
Coder On BEST ANSWER

Ok, so I figured it out how to solve this. I found multiple solutions:

  • Inspect the image's XMP data if it's available. The projection type equirectangular is enough for detection. There are some libraries that can be used to get EXIF, XMP,...metadata
  • Inspect the picture size. Usually speric images have 2x1 ratio, so if you devide the image width with the image height you should get 2 or a number higher. I also add the limitation that image width should be greater then 1000px.