Short: Bitplane optimizer Author: bifat/tek Uploader: bifat@neoscientists.org Type: gfx/conv Version: 0.5 Architecture: i686-linux, i686-windows About BPLOptimize: BPLOptimize is an IFF ILBM and DEGAS PI1 converter that optimizes bitplanes for better compression with LZ-like compression algorithms. It rearranges the individual colors and palette entries in a way that the bitplanes consist of more equal bytes and sequences, which can then be compressed more efficiently. By default the optimizer runs against non-interleaved bitplanes. In 'pi1' mode, it loads and saves a DEGAS PI1 picture, and the optimizer runs against four bitplanes interleaved in four consecutive words each. The filesize of the compressed raw bitplane data can be similar to the same picture saved in PNG format. This may be interesting especially for games and demos. This tool also produces smaller IFF ILBM files, but this was not the original goal. Interlace, hires, HAM6, EHB, and images with PCHG chunks should be supported. For DEGAS PI1 an image dimension can be specified, which overrides the default of 320x200. Idea originally suggested here: http://eab.abime.net/showthread.php?t=82826 Command overview: $ bploptimize argument template: -f FROM/A input file [default IFF ILBM] -o TO/A output file [default IFF ILBM] -m MODE/K 'pi1' for DEGAS PI1 [default IFF ILBM] -d DIM/K DEGAS PI1 image dimension [default 320x200] -k KEEP/K colors/ranges to keep: a-b,c,d-e,... -nc NOCOMP/S save uncompressed IFF -i ITER/N/K number iterations [default 100000] -e EXP/N/K curve exponent [default 1.5] -s SEED/N/K seed value -b BRUTE/S use brute force (unfunny with >8 colors) Use the -k option to specify colors and color ranges that you wish to remain unaffected by optimization, e.g. -k 0 would preserve the background color. Technical details: While it does take a long time to optimize a picture, this is not a brute force, but a heuristic algorithm. With brute force, optimizing a 32 color picture would take much, much longer. Version history: 0.5 - results were not stable across Windows and Linux, fixed. - added brute force option, but this is rather pointless. Just to prove that the optimizer works fine with 3 bitplanes. 0.4 - added DEGAS PI1 support, suggested by Insane/TSCC - added IFF ILBM compression and -nc option 0.3 initial release