Hello,
I am trying to crop an image into sub-images and am using the following:
Version: ImageMagick 6.5.8-10 2010-12-17 Q16
convert cookie-monster.jpg -crop 3x3@ +repage +adjoin cookie-monster-c.jpg
this is working great and produces 9 images starting from top left to bottom right
however I need the order to be top right to bottom left, the reason is the naming matching the original order.
I have tried using -gravity but had no success, please help.
Thanks in advance,
YB.
crop direction NorthEast
Re: crop direction NorthEast
If it's always going to be a 3x3 tile, -swap can reorder the images:
http://www.imagemagick.org/Usage/basics/#swap
-swap 0,2 -swap 3,5 -swap 6,8
should work for your 3x3 grid.
http://www.imagemagick.org/Usage/basics/#swap
-swap 0,2 -swap 3,5 -swap 6,8
should work for your 3x3 grid.
Re: crop direction NorthEast
thanks,
but I am trying to write a script for any case, not just this one.
but I am trying to write a script for any case, not just this one.
Re: crop direction NorthEast
Two '-flip' operators would work then. Flip the image first, delete the original, then flip each generated tile.
EDIT: Oh, yes. -flop, not -flip Works a treat as far as I can tell. Not sure why you don't like it
EDIT: Oh, yes. -flop, not -flip Works a treat as far as I can tell. Not sure why you don't like it
Last edited by viarun on 2011-01-28T11:51:32-07:00, edited 1 time in total.
Re: [WORKAROUND] crop direction NorthEast
that should do the job (with flop instead of flip),
however it still isn't really the solution I am looking for.
Thanks,
YB.
however it still isn't really the solution I am looking for.
Thanks,
YB.