execute batch Cube to Sphere with PHP/Linux

  • Hi all,
    I'd like to execute the batch file to convert images to a sphere on my webserver (PHP/Linux). Is that possible at all?

    Images are located in: /path/to/images/abcdefgh/
    krpano is located in: /path/to/tools/

    I tried something like:
    exec('/path/to/tools/convert.bat cube2sphere -config=/templates/convertdroplets.config img1 img2 img3 img4 img5 img6');

    But this is not working. Any tips/ideas?

    *edit*
    Let me change the question. How to convert 6 single cubemap images to a sphere map with PHP? Any PHP class which can do this?

    regards, Chris

    Einmal editiert, zuletzt von cdl (23. Juli 2015 um 16:35)

  • You're trying to run a bat file on linux... *confused*

    Just use the krpanotools binary.

    If you are familar with windows.. get your command line working on your 32 or 64 exe first.. and then switch to krpanotools. Then you can see your erorrs.. unless you have shell access, in which case use that.

  • The thing is, we would like to use the cube to sphere converter online. This is shared hosting, a Linux server running on Apache. There's no shell access.
    I'm wondering if it's possible at all without any command line or shell access?

  • OK sure. Just follow my previous instructions.
    You do have commandline if you can run exec from php.

    Since you're flying blind then, it's a lot harder. I'd suggest working first in an environment with shell access and apache and then just port your work over.
    It's absolutely possible to do what you want. It's as easy as calling

    Code
    shell_exec('krpanotools ...');

Jetzt mitmachen!

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