0

I need to create a preview of an uploaded file. Problem: The file will be a 360° panorama, and i use pannellum as display library. So i installed pageres on my debian server and after uploading i just exectute this PHP line:

exec("pageres https://myserver.com/preview.html?PicCode=$Code&Width=$Width&Height=$Height' {$Width}x$Height --crop --filename '$Code' > /dev/null &");

And it definitely works GREAT! I got a perfect screenshot. Unfortunately (and like expected) it's just the message that WebGL is not supported on "this device"... :(

I searched Stackoverflow, Googled around. Unfortunately no helpful idea. So i would need a Guru (or just some1 who knows how to Google for the right solution) to help me out. Actually i need a 2-step-process for the customer (1st upload, 2nd click for creating a preview) and that's not really funny.

How could i enable pageres to render a simple 2D-canvas?

Any ideas?

Mac
  • 1
  • 4

1 Answers1

0

Instead of using Pageres and Pannellum together, what if you instead got an offline utility that created a panorama preview for you? This question then becomes very similar to this other one. There's lots of info to be had also in this thread.

In short, I recommend looking at, for example, this command-line utility: https://github.com/denivip/panorama

adzenith
  • 757
  • 5
  • 8
  • Well, i know about the tools you mentioned. But i have as source an equirectangular panorama and want to create a preview with a preset pitch / yaw / hfov. And this won't work with the "how to create a cubemap" things, you mentioned. I will try an approach to modify pannellum in a way that i'll get the RGB pixel matrix and convert it into an image. This looks actually like the only way to go. – Mac Jun 01 '17 at 14:24