Using convert to split images into multiple files

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
imagecorpis

Using convert to split images into multiple files

Post by imagecorpis »

Could some expert ImageMagick user give me a help?

I have a large 256x256 bitmap I want to convert into 32x32 textures (8 horizontal, 8 vertical). Is there any way to set convert to "crop" specific parts of the bitmap ? Do I need 16 separate convert commands to do that? If so, what would be the basic parameters?

Thanks in advance,
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Using convert to split images into multiple files

Post by magick »

Try this command:
  • convert image.png -crop 32x32 parts-%02d.png
imagecorpis

Re: Using convert to split images into multiple files

Post by imagecorpis »

Wow, that's much easier than I thought!

Thanks for such an awesome tool!
Post Reply