Thursday, February 18, 2010

ImageMagick: split one image to smaller images

Lets assume that we have a 1024x1024 pixel image called test.tif and that we want to split this image into 64x64 non-overlapping images called test001.tif, test002.tif, test003.tiff,....
We can do this using this command from
convert -crop 64x64 +repage test.tif test%02d.tif

9 comments:

  1. Anonymous12:43 PM

    This is exactly the reason why I started using Linux so many years ago. This would be almost impossible and certainly very difficult in windows, but with Linux, I did all my images (300 in total) in 2 minutes (that included the time to write a little script to run this command). Long Live Linux!

    ReplyDelete
    Replies
    1. Anonymous8:11 PM

      You mean long live ImageMagick; as they make this tool for OSX and Windows as well...

      Delete
  2. How about putting them together into a single image with imagemagick?

    ReplyDelete
  3. Almost impossible and certainly very difficult in windows? You can do the same thing in Windows in the same amount of time. You realize there are command line tools in Windows, right?

    ReplyDelete
  4. Anonymous8:17 AM

    so anthony, care to share how?

    ReplyDelete
    Replies
    1. Anonymous8:12 PM

      Try searching for "ImageMagick Windows".

      Delete
  5. Anonymous4:51 AM

    lol. long live linux sure but image magick is for windows too and its exactly the same

    ReplyDelete
  6. Anonymous12:03 PM

    great information

    ReplyDelete
  7. Hey Anonymous, the EXACT same command works in Windows on the command line. Stop being a Trolling Linux Zombie.

    ReplyDelete