Breaking an image down into it's component tiles
Posted: 2010-04-15T11:12:53-07:00
I've been messing around with this for a bit, and i haven't come up with a good solution yet...
I have a bitmap that's composed of 16x16 px tiles, the bitmap is 256x240 px. I need to break image down into a text file with the tile numbers labeled.
I hope i'm allowed to link an example picture (caution, it's a 1.5 mb bitmap): http://programmingace.com/images/BioForceApe/Level1.bmp
You can see the 4 images are made up of the smaller tiles on the bottom. I need to break them into text data that identifies which tile goes where so I can redraw the screen. I'm thinking I can crop the images into 240 16x16 tiles, then use the -compare option to flag which tiles are identical, but i haven't gotten it to work yet.
So far i've been doing this by hand on paper, but it's taking me about 2 hours per screen. Any help in the right direction would be appreciated.
I have a bitmap that's composed of 16x16 px tiles, the bitmap is 256x240 px. I need to break image down into a text file with the tile numbers labeled.
I hope i'm allowed to link an example picture (caution, it's a 1.5 mb bitmap): http://programmingace.com/images/BioForceApe/Level1.bmp
You can see the 4 images are made up of the smaller tiles on the bottom. I need to break them into text data that identifies which tile goes where so I can redraw the screen. I'm thinking I can crop the images into 240 16x16 tiles, then use the -compare option to flag which tiles are identical, but i haven't gotten it to work yet.
So far i've been doing this by hand on paper, but it's taking me about 2 hours per screen. Any help in the right direction would be appreciated.