Tool that breaks up bitmap, removes duplicate tiles, etc?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Tool that breaks up bitmap, removes duplicate tiles, etc?
by on (#104261)
Any suggestions for a tool that:

- takes a bitmap
- breaks it into 8x8 tiles
- removes duplicates
- saves the tiles into a separate bitmap
- creates array of tile indexes to rebuild the bitmap as tiles
- saves array to a file

Thanks!
djcc
Re: Tool that breaks up bitmap, removes duplicate tiles, etc
by on (#104262)
I made one, and it even handles NES attributes if you give it a palette to work with.

Homebrew Projects > Graphics editor for NES
Re: Tool that breaks up bitmap, removes duplicate tiles, etc
by on (#104263)
Shiru's NES Screen Tool can import a bitmap and optimize out duplicate tiles, but I'm guessing you're looking for a solution that's not limited to NES?
Re: Tool that breaks up bitmap, removes duplicate tiles, etc
by on (#104264)
thefox wrote:
Shiru's NES Screen Tool can import a bitmap and optimize out duplicate tiles, but I'm guessing you're looking for a solution that's not limited to NES?



That's correct. I'd be using it for my genesis project but its the sort of tool that's useful no matter the platform.
Re: Tool that breaks up bitmap, removes duplicate tiles, etc
by on (#104270)
I have such tool in my personal use, not limited to NES and small pictures, but it is so user unfriendly so even I have difficulties with it. If you won't be able to find something better, I can fix it a bit to be more useful for users other than me.
Re: Tool that breaks up bitmap, removes duplicate tiles, etc
by on (#104275)
Pyxel Edit
It can do everything in your list. (though the way it saves an array to a file may not be best for you. But whatever)
Import an image with 8x8 tile size. It will check for duplicates, even transformations. (Sadly you can't choose which transformations. For instance, You want it to check for X and Y flipped tiles but not rotations.)

It's a pretty self explanatory program.
Re: Tool that breaks up bitmap, removes duplicate tiles, etc
by on (#104279)
djcouchycouch wrote:
Any suggestions for a tool that:

- takes a bitmap
- breaks it into 8x8 tiles
- removes duplicates
- saves the tiles into a separate bitmap
- creates array of tile indexes to rebuild the bitmap as tiles
- saves array to a file

Thanks!
djcc


I think I can make one!

The idea:
1 convert bitmap to 64 colors
2 convert bitmap to chr
3 removes duplicates(chr)
4 make nametable(pal...) from bitmap and chr

Is it right?
Re: Tool that breaks up bitmap, removes duplicate tiles, etc
by on (#104284)
byemu wrote:
I think I can make one!

The idea:
1 convert bitmap to 64 colors
2 convert bitmap to chr
3 removes duplicates(chr)
4 make nametable(pal...) from bitmap and chr

Is it right?


I was looking for more of a generalized tool since I'm not working on NES at the moment. It wouldn't need to be platform specific at all. Ideally it would handle various pixel bit depths correctly. It just takes a bitmap of whatever depth and covert it to a tile set bitmap and an array (in C, in text, in asm, whatever).

I'll be checking out people's suggestions. Thanks!
Re: Tool that breaks up bitmap, removes duplicate tiles, etc
by on (#104324)
There was one made for the GBA that did this (can't find it on my computer anymore, tho... nor remember the name.) and since it worked with 4bpp tiles, SNES and PCE tilemaps could be made as well. It did have a bug where it dropped about 3 tiles per tilemap, but it served its purpose well enough.

I dunno, try searching GBA dev sites for map creation tools.
Re: Tool that breaks up bitmap, removes duplicate tiles, etc
by on (#104326)
djcouchycouch wrote:
Any suggestions for a tool that:

- takes a bitmap
- breaks it into 8x8 tiles
- removes duplicates
- saves the tiles into a separate bitmap
- creates array of tile indexes to rebuild the bitmap as tiles
- saves array to a file


This is easily done with grit: grit input.png -m -fx tiles.png. See the manual for details.
Re: Tool that breaks up bitmap, removes duplicate tiles, etc
by on (#104344)
I use my GFX converter for such a job, it supports 4 or 8 bit BMP files and can generate just tiles, tiles arranged for sprites and as optimized image file that holds a tilemap and tiles with dupes removed. Made for MD but can do SMS/GG too (and possibly other machines too with some adjustments).
No user interface nor command line, only takes a configuration file with parameters laid out. No error checks so there will be some possibly spectacular fails on bad input :P
Re: Tool that breaks up bitmap, removes duplicate tiles, etc
by on (#139991)
I am using a combination of pyxel edit and photoshop for this process.
Re: Tool that breaks up bitmap, removes duplicate tiles, etc
by on (#140706)
Retro Graphics Toolkit should be able to do that see viewtopic.php?f=21&t=9894
If you want a custom tile bit-depth or size that will be available soon. Also with Lua scripting you will have lots of possibilities to do what you want.