I am working to create a Google group for Ubuntu but one thing I want to do is create the main image that goes in the top (The one that divides into 5 pieces). How can I divide an image horizontally (Or vertically) via Terminal or GUI.

For example I grab a Ubuntu Quantal image and tell a GUI or terminal program to divide the image in 5 equal parts horizontally (In this case).


Install ImageMagick, and then use the command convert:

convert -crop 20%x100% rose.jpg rose2.jpg  


  • 20% is 1/5 of 100% and therefore will crop the image in 5 equal parts.
  • 100% tell it will not be croped vertically.
  • rose.jpg is the original file.
  • rose2.jpg is the output.
  • Thanks for the explanation. Was going to ask about the % before going for the --help of the command. Is there an option to crop it vertically. I would think to first flip it 90 degrees then crop it, then flip it back -90 degrees but maybe there is another way. – Luis Alvarado May 29 '12 at 0:58
  • 2
    Just invert the command 20%x100% to 100%x20%: convert -crop 100%x20% rose.jpg rose2.jpg – desgua May 29 '12 at 1:06
  • Amazing really. Very easy to know and apply. – Luis Alvarado May 29 '12 at 1:12

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.