You are not logged in.

Dear visitor, welcome to Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

  • "Douglas Rhiner" started this thread

Posts: 103

Location: Fairfax, CA

Occupation: Code-Slave

  • Send private message


Friday, March 4th 2011, 4:48am

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.



Posts: 1,003

Location: Netherlands

Occupation: Web developer

  • Send private message


Friday, March 4th 2011, 1:37pm

you could use php exec function?
that droplets of krpano support command line


Friday, April 8th 2011, 11:33am

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:

Source code

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