update readme

This commit is contained in:
sillysagiri 2025-05-12 13:04:39 +07:00
parent f328c214b7
commit 204518302a

View File

@ -9,32 +9,23 @@ 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...
there is also paletteId that tell which palette the image used.
usage: sillyimage <input image> [options]
color palette are embedded in the file.
a palette hash is provided. this can be used to comparing
whether another image uses the same palette
usage: sillyimage -i <input image> -o <output dir> [options]
options:
-o, --out
output directory
-f, --format
specify format {rgb256, rgb16, indexed4, indexed16, indexed256, indexed32a3, indexed8a5}
-c, --compress
specify compression {none, lzsswram, lzssvram, gzip}
-pid, --palette-id
specify the palette id
-n, --num
limit num color regardless of the format
-v, --verbose
enable verbose printing
-i, --input input files [required] [may be repeated]
-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, indexed32a3, indexed8a5 } [default: "rgb16"]
binary format:
[string] sillyimg (0x676D69796C6C6973 in hex or 7452728928599042419 in decimal (uint64))
[uint8] version (current version is 0)
[uint8] version (current version is 13)
[uint8] format
0 - RGB256
1 - RGB16
@ -44,16 +35,14 @@ binary format:
5 - INDEXED32A3
6 - INDEXED8A5
7 - PALETTE16
[uint8] paletteId
[uint16] width
[uint16] height
[uint8] compression
0 - none
1 - lzss wram
2 - lzss vram
3 - gzip
[uint32] buffer length
[buffer]
[uint16] palette count
[uint32] palette hash
[uint32] compress size
[uint32] original size
[palette buffer]
[image buffer]
TODO:
[x] bitpacking for indexed format
@ -61,13 +50,14 @@ TODO:
[ ] convert image using predefined palette
[ ] output preview image
[ ] improve error handling
[ ] compression
[x] compression
dependecies:
argh (https://github.com/adishavit/argh)
stb_image, stb_image_writer (https://github.com/nothings/stb)
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)
murmurhash.c (https://github.com/jwerle/murmurhash.c)
Timer.h from cherno (https://gist.github.com/TheCherno/b2c71c9291a4a1a29c889e76173c8d14)
license:
GPL v3