windows - Basic Math Operations with ImageMagick & CMD -


i want crop picture multiple times. postion need start cropping depends on equations:

startx = %x * 1024 starty = %y * 1024 

i`m unable implment in command line. got:

for /l %y in (0,1,5)   /l %x in (0,1,5)   convert fireball.png -crop 2048x2048+(%x*1024)+(%y*1024)% fireball_(%x,%y).png 

i'm using windows 7 cmd.

i fixed syntax can't vouch algorithm. % after ) may typo if needs there in cmd needs doubled (as shown) equal 1 %.

note cmd math integer , tops out @ 2^31 - 1

for /l %%y in (0,1,5) ( /l %%x in (0,1,5) ( convert fireball.png -crop 2048x2048+^(%%x*1024^)+^(%%y*1024^)%% fireball_^(%%x,%%y^).png ) ) 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -