|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
@echo off IF %1 == "" GOTO ERROR IF NOT EXIST %1 GOTO ERROR FOR %%V in (%*) do "%~dp0\ktransform" cube6 %%V %%V GOTO DONE :ERROR echo ERROR - drop spherical panorama image to process... pause :DONE |
Hi,The problem with this code is that there is no control of the output format (Tiff or Jpeg).... If your inputs are jpg files then the output will be jpg... If your inputs are tiff files then the output will be tiff... This is because, in this code, the output file argument for Ktransform is the same as the input file argument...
I do not know how to do a different way.

|
|
Quellcode |
1 |
FOR %%V in (%*) do "%~dp0\ktransform" cube6 %%V %%~dpnV.jpg |
|
|
Quellcode |
1 2 3 4 5 |
%%V = c:\images\image.tif %%~nV = image %%~pnV = \images\image %%~dpnV = c:\images\image %%~dpnV.jpg = c:\images\image.jpg |
|
|
Quellcode |
1 |
help for |

Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »mham« (11. September 2009, 09:19)
Zitat
I suppose if I want to have jpeg quality 95 instead of default and also optimize the jpeg I can change the code to the following?
FOR %%V in (%*) do "%~dp0\ktransform" cube6 %%V %%~dpnV.jpg -jpegoptimize -jpegquality=95![]()
Zitat
Also to take it another step further, from Klaus's comment it seems I could put the resulting cube faces in a separate folder, say in "myCubes" folder (and not in the same folder as source images).
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
@echo off IF %1 == "" GOTO ERROR IF NOT EXIST %1 GOTO ERROR FOR %%V in (%*) do "%~dp0\ktransform" cube6 %%V "%%~dpV\myCubes_folder\%%~nV.jpg" -jpegoptimize -jpegquality=95 GOTO DONE :ERROR echo ERROR - drop spherical panorama image to process... pause :DONE |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
@echo off IF %1 == "" GOTO ERROR IF NOT EXIST %1 GOTO ERROR FOR %%V in (%*) do "%~dp0\ktransform" cube6 %%V "C:\path_to_myCubes_folder\%%~nV.jpg" -jpegoptimize -jpegquality=95 GOTO DONE :ERROR echo ERROR - drop spherical panorama image to process... pause :DONE |