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.

Image file with multiple image within it

  • 1
    convert -crop geometry
    – bsd
    Oct 28 '15 at 8:42

To simply split your image into quadrants (same size) use crop+repage:

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

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.