hajduakos / PanoDotNet

Interactive panorama viewer for equirectangular (360x180°) panoramas, using WPF 3D.
MIT License
22 stars 11 forks source link

360:180 ? #3

Open royben opened 7 years ago

royben commented 7 years ago

Hi,

Great work!

Why is the viewer limited to 2:1 ratio images ? Can't it just adjust to the loaded image ratio ? There are lots of panoramic images that are not necessarily 2:1.

Thanks.

hajduakos commented 7 years ago

Hi,

Thanks!

So far it is limited to 2:1 ratio images because I focused on full, 360x180 equirectangular panoramas where the standard is a 2:1 ratio. However, I think that if your panorama has a different aspect ratio, but it is still a full 360x180 panorama, the program will work.

However, if you have a partial panorama, e.g. only 180x60 then you would expect the image in the middle, surrounded with black areas. The problem is that the aspect ratio is not enough for this, the exact angles are needed. For example a 180x60 and a 90x30 image both have 3:1 ratio, but they have to be displayed differently. Currently, I don't have time for doing this, but an easy workaround would be the following: load the image and ask for the angles. Create an empty 2:1 image (representing 360x180) and put the loaded image on this empty image based on the angles. For example a 180x60 image would occupy half the width and 1/3 of the height.