I've been kicking this idea around for a while, so here I've finally gotten around to some sort of implementation. The fx-imglib toolset is intended to consist of a few PC-side utilities for image compression and embedding in G3A files, and a device-side (Prizm) library for decompressing images.
Rationale, features
It makes me sad when people embed graphics and resources in source code, as everybody's been doing with Prizm programs thus far. With a few simple conversion programs (such as the convert565 tool in the mkg3a source tree) and a little bit of objcopy trickery, it's easy to embed resources in your binaries directly. I intend to make the necessary additions to the Prizm SDK package's makefile to do this.
Rolling your own compression and decompression routines is a pretty big time-waster. Preliminary tests on Kerm's Obliterate title screen with LZF compression got it down to about 85 kilobytes as RGB8 (34% of its original size, about half the size it is as RGB565, and only ~10 kB larger than the PNG). Further improvements are expected as I implement pre-filtering and perhaps tweak the LZF bitstream to work better with RGB565 data rather than plain bytestreams.
What's implemented
I have a working LZF compressor (that needs optimization) and untested decompressor. I prototyped resource-embedding with objcopy a while ago but didn't test it- shouldn't be hard to make it work. Filtering is the next thing on my list to implement- will have to see how well it actually works.
Rationale, features
It makes me sad when people embed graphics and resources in source code, as everybody's been doing with Prizm programs thus far. With a few simple conversion programs (such as the convert565 tool in the mkg3a source tree) and a little bit of objcopy trickery, it's easy to embed resources in your binaries directly. I intend to make the necessary additions to the Prizm SDK package's makefile to do this.
Rolling your own compression and decompression routines is a pretty big time-waster. Preliminary tests on Kerm's Obliterate title screen with LZF compression got it down to about 85 kilobytes as RGB8 (34% of its original size, about half the size it is as RGB565, and only ~10 kB larger than the PNG). Further improvements are expected as I implement pre-filtering and perhaps tweak the LZF bitstream to work better with RGB565 data rather than plain bytestreams.
What's implemented
I have a working LZF compressor (that needs optimization) and untested decompressor. I prototyped resource-embedding with objcopy a while ago but didn't test it- shouldn't be hard to make it work. Filtering is the next thing on my list to implement- will have to see how well it actually works.