mpetroff / pannellum

Pannellum is a lightweight, free, and open source panorama viewer for the web.
https://pannellum.org/
MIT License
4.15k stars 710 forks source link

Batch Multiresolution conversion #1161

Closed EloyAldao closed 1 year ago

EloyAldao commented 1 year ago

Hi:

I have a tour project with more than 500 images. They are equirectangular, but too big to be seen in mobile phones. So I manages to make a script to use the multiresolution instead. Then I need to convert from jpg equirectangular to multiresolution.

I have this batch:

python "R:\RepositorioCodigo\PythonScripts\PANNELLUM_generate_Multipanorama.py" -n "C:\Program Files\Hugin\bin\nona.exe" "W:\PoTree\Pannellum\images\Planta_0_C-006.jpg --output "Planta_0_C-006"
python "R:\RepositorioCodigo\PythonScripts\PANNELLUM_generate_Multipanorama.py" -n "C:\Program Files\Hugin\bin\nona.exe" "W:\PoTree\Pannellum\images\Planta_0_C-007.jpg --output "Planta_0_C-007"
python "R:\RepositorioCodigo\PythonScripts\PANNELLUM_generate_Multipanorama.py" -n "C:\Program Files\Hugin\bin\nona.exe" "W:\PoTree\Pannellum\images\Planta_0_C-009.jpg --output "Planta_0_C-009"
python "R:\RepositorioCodigo\PythonScripts\PANNELLUM_generate_Multipanorama.py" -n "C:\Program Files\Hugin\bin\nona.exe" "W:\PoTree\Pannellum\images\Planta_0_C-008.jpg --output "Planta_0_C-008"
python "R:\RepositorioCodigo\PythonScripts\PANNELLUM_generate_Multipanorama.py" -n "C:\Program Files\Hugin\bin\nona.exe" "W:\PoTree\Pannellum\images\Ext_Darsena-001.jpg --output "Ext_Darsena-001"

But I keep getting the error the Output directory "./output" already exists

How can I modify my batch file to make every image on their own folder?

Thanks in advance

mpetroff commented 1 year ago

You seem to have already solved your issue, but if anyone else has the same problem and comes across this issue, the problem above was that --output was being specified after the input file but needed to be specified before it, e.g.,

python "R:\RepositorioCodigo\PythonScripts\PANNELLUM_generate_Multipanorama.py" -n "C:\Program Files\Hugin\bin\nona.exe" --output "Planta_0_C-006" "W:\PoTree\Pannellum\images\Planta_0_C-006.jpg