SolidState

ClashState – A new image converter

ClashState allows you to convert JPEG, GIF or PNG images the native formats of 8-bit computers.

ClashState UI

The software is written in Python and uses DearPyGUI for the GUI.

The conversion algorithm is an evolution of the module I developed for RetroBBS, it makes use of HitherDither de Henrik Blidh (with some changes), Pillow and Kmeans via OpenCV.

Features

Supports the following graphic modes:

  • Commodore 64 HiRes: 320×200 pixels 16 colours – 2 colours per 8×8 pixels attribute.
  • Commodore 64 Multicolor: 160×200 pixels 16 colours – 4 colours per 4×8 pixels attribute, 1 of them fixed for the whole image.
  • Commodore 64 AFLI: 296×200 pixels 16 colours – 2 colours per 8×1 pixels attribute.
  • Commodore 64 Unrestricted: Fantasy mode, 320×200 pixels 16 colours, no restrictions.
  • MSX 1 Screen 2: 256×192 pixels 15 colours – 2 colours per 8×1 pixels attribute.
  • MSX 1 Unrestricted: Fantasy mode, 256×192 pixels 15 colours, no restrictions.
  • ZX Spectrum: 256×192 pixels 15 colours – 2 colours per 8×8 pixels attribute.
  • ZX Spectrum Unrestricted: Fantasy mode, 256×192 pixels 15 colours, no restrictions.

Free positioning and scaling of the input image: Click and drag the input image to set the position/cropping. Use your mouse wheel for zooming.

Real time adjustment of:

  • Contrast
  • Brightness
  • Hue
  • Saturation
  • Sharpness

Dithering, color quantization:

  • 2-step quantization: luminance and final. The optional luminance step is applied only over the input image luminance channel and either the selected color palette’s luminance channel or over black and white.
  • Ten types of dithering/quantization:
    • None: Nearest color, or no effect when selected for the luminance step
    • Bayer 2×2
    • Bayer 4×4
    • Bayer 4×4 (Odd)
    • Bayer 4×4 (Even)
    • Bayer 4×4 (Spotty)
    • Bayer 8×8
    • Yliluoma
    • Cluster dot
    • Floyd Steinberg
  • With the exception of Yliluoma and Floyd Steinberg, the quantization threshold can be adjusted from 1 (darker) to 5 (lighter).
  • Selection for Euclidean distance o CCIR 601 color comparison (found in the Options menu). Ylilouma and Floyd Steinberg use their own methods.

Color Palettes:

  • Quantization and preview palettes can be independently selected
  • Each color in the palette can be enabled/disabled individually, for fine tuning the conversion result.
  • When enabling only 2 colors the quantization can be made over the real color values treat the quantization palette as pure black and white.

Leave a Reply

© 2024 SolidState

Theme by Anders Norén