RetroNick2020 / Color-Reduction

Reduce color information of a 24-bit RGB bitmap down to 8-bit.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Color Reduction

Reduce color information (quantization) of a 24-bit RGB bitmap down to 8-bit palette-based bitmap.

Compile

make

or

makedos.bat		# MS-DOS target

No external dependencies required. It was tested on macOS Monterey (clang) and MS-DOS (DJGPP).

Usage

./unipal input.bmp [dither]

Whereas:

  • input.bmp: image to be quantized, must be a 24-bit Windows bitmap.
  • dither: enable dithering using 4x4 ordered matrix

Output image will be stored as a 8-bit Windows bitmap under the name output.bmp.

Preview

Left: Original; Middle: 8-bit undithered; Right 8-bit dithered.

compares

About

Reduce color information of a 24-bit RGB bitmap down to 8-bit.

License:GNU General Public License v3.0


Languages

Language:C 98.4%Language:Makefile 1.5%Language:Batchfile 0.1%