Splitting an image into chunks of a specified size?

Started by
1 comment, last by null; 7 years, 7 months ago

I was just wondering how exactly I would go about splitting a single image into multiple images of a specific size.

Essentially, I would just take a regular image, and split it into, say, multiple images which are 16x16.

I looked online for an answer, but my search terms were probably a bit messed up since the only stuff I could find was splitting it into specified rows and columns (not specifying the actual desired size of the output image).

Is there a standard algorithm for splitting an image into smaller parts of the desired size?

Thanks!

EDIT: I really need to try harder before asking. Sorry! It was really easy to do, but I just missed it somehow. But please, feel free to answer. I might learn something new!

Advertisement

EDIT: I really need to try harder before asking. Sorry! It was really easy to do, but I just missed it somehow.

Care to share? In case others find this thread by searching :)

Hello to all my stalkers.

EDIT: I really need to try harder before asking. Sorry! It was really easy to do, but I just missed it somehow.

Care to share? In case others find this thread by searching :)

Well, the heart of it is essentially creating a BufferedImage with the paramters of (specified width, specified height, image type).

The rest consists of basic loops which really anyone with beginner knowledge can do : P For some weird reason, I didn't try that in the first place even though it's extremely simple.

This topic is closed to new replies.

Advertisement