Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for professional graphic designers and non-designers trying to do their own graphic design. It's 100% free, no registration required.

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

share|improve this question
1  
This might not be 100% on-topic, but are you allowed to use the minecraft textures for just any project? –  Johannes 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
add comment

2 Answers

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.

share|improve this answer
add comment

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:

http://www.imagemagick.org/Usage/crop/#crop_tile

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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