Page 1 of 1

More than one action at a time

Posted: 2015-08-23T15:16:14-07:00
by evilaro
I use Windows

Hi:

I am sure it can be done.

I red it some place but I can not find it, nor any of my trials
have done what I want.

I have a single image that I want to CROP to a 4x4 pieces of
a puzzle.

So doing this I get the pieces croped of the original image.

This the example for the first 4 pieces

run "convert "ROMPECABEZAS.BMP" -crop 200x150+0+0 R_A1.bmp"
run "convert "ROMPECABEZAS.BMP" -crop 200x150+200+0 R_A2.bmp"
run "convert "ROMPECABEZAS.BMP" -crop 200x150+400+0 R_A3.bmp"
run "convert "ROMPECABEZAS.BMP" -crop 200x150+600+0 R_A4.bmp"

The problem is that there are 16 pieces, and in the future could be more
so making this process 16 times, takes time and you keep seen the windows
frame everytime.

I wonder if this could be done (the 4 in this example) in one go

I have tried this combination but it does not work as I want.

run "convert "PHOTO.BMP" -crop 200x150+0+0 R_A1.bmp -crop 200x150+200+0 R_A2.bmp"

I would appreciate some help.

Emilio

Re: More than one action at a time

Posted: 2015-08-23T15:31:36-07:00
by snibgo
If you want to crop into 16 pieces, being 4 horizontally and 4 vertically:

Code: Select all

convert in.png -crop 4x4@ +repage out-%03d.png
This will give out-000.png, out-001.png etc.

Re: More than one action at a time

Posted: 2015-08-24T00:18:59-07:00
by evilaro
Snibgo:

Well...

I felt I was reinventing the wHeel, but you shower me that the airplane ALREADY exists ;)

Thanks... very powerful.

Still if as I said, I can add different command in just one line and where this would be explained.

Thanks a lot

Emilio

Re: More than one action at a time

Posted: 2015-08-24T10:28:44-07:00
by fmw42
Still if as I said, I can add different command in just one line and where this would be explained
see
http://www.imagemagick.org/Usage/basics/#parenthesis

Re: More than one action at a time

Posted: 2015-08-24T15:18:43-07:00
by evilaro
fmw42:

Yes ,that I feel is the way...

Thanks a lot

Emilio