i make this tool for my ds to make loading texture easier... desgined for my personal use only.... its not really optimized and use really minimal error checking please use something more stable like ptexconv or grit instead! since ptexconv and grit just simply convert image data into loose Binary i tried to create header with the metadata information of the image the idea is to simply load image data without worrying about image metadata. the metadata contain basic stuff like width, height, format, etc... color palette are embedded in the file. usage: sillyimage -i <input image> -o <output dir> [options] options: -i, --input input files [required] -o, --out output directory [required] -h, --help shows help message and exits -v, --version prints version information and exits -f, --format texture format { rgb256, rgb16, indexed4, indexed16, indexed256, indexed32a8, indexed8a32 } [default: "rgb16"] -pf, --palette-format palette format { rgb16, rgb256 } [default: "rgb16"] -be, --big-endian enable big endian mode [default: false] binary format: [string] sillyimg (0x676D69796C6C6973 in hex or 7452728928599042419 in decimal (uint64)) [int8] version (current version is 14) [int8] format 0 - RGB256 1 - RGB16 2 - INDEXED4 3 - INDEXED16 4 - INDEXED256 5 - INDEXED32A3 6 - INDEXED8A5 7 - PALETTE16 [int8] big endian mode [int8] palette format 1 - rgb16 (2 bytes per palette) 2 - rgb256 (4 bytes per palette) [int16] width [int16] height [int16] palette count [int32] original size [int32] compress size [palette buffer] (palette count * palette format size) [image buffer] TODO: [x] bitpacking for indexed format [x] bitpacking for alpha indexed format [ ] convert image using predefined palette [ ] output preview image [ ] improve error handling [x] compression dependencies: argparse (https://github.com/p-ranav/argparse) stb_image (https://github.com/nothings/stb) libimagequant (https://github.com/ImageOptim/libimagequant) Timer.h from cherno (https://gist.github.com/TheCherno/b2c71c9291a4a1a29c889e76173c8d14) FastLZ (https://github.com/ariya/FastLZ) license: GPL v3
Languages
C++
90.8%
CMake
9.2%