Running ktransform on the server ...

  • Hi again,
    I'm a newbee in both krpano and PHP and I'd like to use both, hopefully I can get some help here.

    I have loads of images (pnoramas) that are going to be displayed using krpano and I'd like to use the cubical format. Instead of tranforming them from Spherical to Cubical one by one, manually on my computer, I would like to do it automatically at the server side (using PHP).
    I've got my PHP upload form set up, when using it the spherical image "inputimage.jpg" goes to "MyImagesFolder" on the server, I have uploaded the ktransform for linux to the server as well and I know that I should somehow run "ktransform cube6 inputimage.jpg outputimage.jpg" but I don't know how to do it in my PHP scripts after the images are loaded to "MyImagesFolder".

    Anybody more experienced in PHP that can help?


    Thanks,
    MH

  • I will respond to your email here :)

    here is how I do it


    the images will be stored on the same place with the same base name as the original.. say image_b.jpg etc etc
    also make sure the krtransform is set to be executed and set it on a folder NOT accessible by public
    hope I made it clear

    Regards

  • Many thanks Shanti,

    It should be as clear as it could be, as you have written the whole code.
    But of some reason I cannot make it work, as I am not a developer myself, I suppose.
    I must have done something wrong, maybe in the different paths.

    If I have the following url:
    http://www.myPanos.com/
    and my panos are in the folder "panoImages" and my pano image is "pano1.jpg", then, In your code sample you have written:
    $path = full/url/to/image.jpg
    I should write:
    $path = http://www.myPanos.com/panoImages/pano1.jpg
    Is this correct?

    Then on the next line in my code should be
    $preview = str_replace("http://www.myPanos.com/","/full/linux/path/public_html/",$path);
    except that the "/full/linux/path/public_html/" should be replaced by something else...
    as I am just using a web hosting service I am not sure if I can see the full linux path,
    all I see is that my index page is in this path "/webspace/httpdocs/",
    I cannot see what is above this structure.
    I suppose this is a possible reason why it does not work.

    Regards,
    /M

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!