convert command of ImageMagick is very useful to split an images file.
To use the convert, you'll need to install ImageMagick beforehand.
brew install imagemagick
Split the image to the left and right
input.png
convert -crop 50%x100% input.png output.png
output-0.png
output-1.png
Split the image to the top and bottom
input.png
convert -crop 100%x50% input.png output.png
output-0.png
output-1.png
Split the image into 4 parts
input.png
convert -crop 50%x50% input.png output.png
output-0.png
output-1.png
output-2.png
output-3.png











Top comments (0)