First public commit.

This commit is contained in:
The Dust Council 2026-07-03 19:35:35 -07:00
parent 2a48f52979
commit 4bac9d83ed
288 changed files with 18417 additions and 1076 deletions

View file

@ -0,0 +1,16 @@
"""TI-99/4A conversion dispatch."""
from __future__ import annotations
from ... import imageprep
from . import gm2, mono
_MODULES = {"gm2": gm2, "mono": mono}
MODES = list(_MODULES.keys())
def convert_image(path_or_img, mode="gm2", palette_name="tms9918",
dither_mode="floyd", intensive=False, prep_opt=None, base_color=None):
prep_opt = prep_opt or imageprep.PrepOptions()
module = _MODULES.get(mode, gm2)
img_rgb = imageprep.prepare(path_or_img, module.WIDTH, module.HEIGHT,
module.PIXEL_ASPECT, prep_opt, border_rgb=(0, 0, 0))
return module.convert(img_rgb, palette_name, dither_mode, intensive, base_color=base_color)