I have an image which contains multiple images in it. I want to split the image into multiple image files, one file per image. How do I do this using ImageMagick?
I have attached a sample image file.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
To simply split your image into quadrants (same size) use
convert image.jpg -crop 50%x50% +repage piece_%d.jpg
If you need different size quadrants you could cut around a single point:
convert image.jpg -crop 240x280+0+0 +repage piece_1.jpg convert image.jpg -crop 0x280+240+0 +repage piece_2.jpg convert image.jpg -crop 240x0+0+280 +repage piece_3.jpg convert image.jpg -crop +240+280 +repage piece_4.jpg