I want to split up the terrain.png image from Minecraft to use in some projects. Is there a quicker way to split the image than selecting each 16x16px section and copy-pasting the sections into new files?

Here is an example:

Example image

  • 1
    This might not be 100% on-topic, but are you allowed to use the minecraft textures for just any project? – Hanna Jun 5 '11 at 23:29
  • That is a good point. Hopefully the projects referred to are personal projects, because you can't use these images in a commercial project. – jhocking Jun 6 '11 at 11:30

Use the Slice Tool like this:

  1. Drag out a slice that encompasses the entire image. You want a "slice", in other words, that is the entire image.

  2. Right-click (Ctl-click with 1-button mouse on a Mac) and choose "Divide Slice" from the context menu. Select your slice sizes and click OK. (Note: you might consider choosing how many slices, rather than what size. It might make things a bit easier when it comes to reassembling the slices.)

  3. Choose "Save for Web&Devices", set whatever parameters will work best for your application, choose a directory in which to save the slices and hit Save. The save creates a folder called "images" and puts all of your slices in there, each with the original filename plus a numeric suffix.

You're done.

[Late edit:] I had one of those forehead-smacking moments. On step 3, choose "Save As Type: HTML and images" to have Photoshop output the slices and a handy HTML Table that puts everything where it should be. One of the few cases where tables are somewhat useful in web design.


This isn't quite a duplicate of this other question (although you don't state it in the question, your tags imply that you want to do this in Photoshop) but I can give the exact same answer: Is there a free software to split a PNG image into some smaller images?

ImageMagick is great for doing things like this from command-line if you need to write batch scripts for image processing:


Your Answer

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