Sie sind nicht angemeldet.

Douglas Rhiner

Fortgeschrittener

  • »Douglas Rhiner« ist der Autor dieses Themas

Beiträge: 141

Wohnort: San Anselmo, CA

Beruf: Code-Slave

  • Nachricht senden

1

Freitag, 4. März 2011, 04:48

GD script for web/server creation of images

What would be really cool is if we had the ability to have a web-based set of krpano Tools / scripts.

Upload an image, leverage the scripting, and out comes the 6 faces and preview.

Zephyr

Profi

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

2

Freitag, 4. März 2011, 13:37

you could use php exec function? http://php.net/manual/en/function.exec.php
that droplets of krpano support command line

3

Freitag, 8. April 2011, 11:33

I experimented with using imagemagick to convert from spherical to cubic, but found that the performance was severely lacking in comparison to the krpano tools. Here's an example, extracting the top face from an equirectangular:

Quellcode

1
convert equirectangular.jpg ( +clone -set option:distort:viewport %%[fx:w/PI]x%%[fx:w/PI]+%%[fx:(w-w/PI)/2]+%%[fx:(h-w/PI)/2] -distort SRT 0 ) +swap -interpolate bicubic -fx "xx=i/w-.5;yy=j/h-.5;ofs=(xx<0)?.5:1.5;pan=(yy==0)?ofs*pi:atan((xx)/(yy))+2*pi;pan=mod((yy>0)?pan+pi:pan,2*pi);tlt=(xx==0&&yy==0)?0:mod(-atan(.5/hypot(xx,yy))+pi/2,pi);v.p{ pan*v.h/pi, tlt*v.h/pi}" out.png