batch file - Multiple Image conversion using ImageMagick -


problem: want able convert multiple images @ time dragging multiple images onto batch file.

here's programming code because resizing each image:

convert "%1" -thumbnail 50x -unsharp 1.5x1.2+1.0+0.10 "%~p1%~n1" convert "%1" -thumbnail 80x -unsharp 1.5x1.2+1.0+0.10 "%~p1%~n1" convert "%1" -thumbnail 120x -unsharp 1.5x1.2+1.0+0.10 "%~p1%~n1" 

each of these lines above in separate file, made file call each of these files. (educational purposes)

all lines below in 1 file:

call imageconvert120x.bat %* call imageconvert80x.bat %* call imageconvert50x.bat %* 

now, when highlight on multiple images, , drop onto file it's calling each of them, converts top one. able convert multiple images @ time after highlighting them , dropping onto batch file.

this should able work file types.

edit:

i've added:

for %%i in (%*) ( call imageconvert120x.bat %* call imageconvert80x.bat %* call imageconvert50x.bat %* ) 

but take first image, , try again , replace again.

the for translates %* (list of files) %%i (single file), it's of no use call imageconvert120x.bat %* (with list of files). use %%i (one single file @ time):

for %%i in (%*) (   call imageconvert120x.bat %%i   ... ) 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

unity3d - Fatal error- Monodevelop-Unity failed to start -