Hello, I am writing a PHP app based on panorama images. I want to use multiresolution feature as the page get slow with big size images, and big resolution images are not showing in iPhone 5/6.
but I don't know how to prepare an image for multires (split into tiles). Tthere is generate.py, but can you help me to understand how I can use that from PHP and store the tiles in a specific folder when the image is uploaded?
Thanks in advance.
You can use phps exec, shell_exec or passthru. Read up on them, decide and check that you have the necessary permissions.
Thank you very much for the answer. i think i can use shell_exec or exec , btw what would be the command if i want to specify the location where the generated files should be stored ?
You can use the -o / --output flag.
thank you for replying. i am little weak in commands. can you show me a full example command ?
to run generate.py from a folder and output in another folder.
./generate.py -o someoutputdirectory inputfile.jpg
Thank you very much for your great support. i will try this command asap.
i have tested this command in my local pc, and it gives error.
my command = generate.py -o /tiles -n test.jpg
response = usage: generate.py [-h] [-o OUTPUT] [-s TILESIZE] [-c CUBESIZE] [-q QUALITY]
[--png] -n EXECUTABLE
INPUT
generate.py: error: the following arguments are required: INPUT
how to solve that ?
is there any explanation at least about how the image should be sliced ? like about dimension and direction of the tiles. so i can find other ways to slice the image.
You're specifying test.jpg as the nona executable and aren't specifying an input image. If nona is on your path, you don't need to use the -n flag, else it needs to point to the nona executable.
To get more, I had to copy the bin folder of the Hugin program into the folder where the file is the image and generate.py getting like this
python generate.py -n bin / nona.exe 01.jpg
Everything went well, take the space here to thank for the excellent work @mpetroff