15 lines
552 B
Python
15 lines
552 B
Python
"""BBC monochrome -- MODE 0's 640x256 black & white, exposed as the standard
|
|
``mono`` mode for cross-platform parity (tone carried by dithering)."""
|
|
from __future__ import annotations
|
|
|
|
from . import mode0
|
|
|
|
WIDTH, HEIGHT, PIXEL_ASPECT = mode0.WIDTH, mode0.HEIGHT, mode0.PIXEL_ASPECT
|
|
|
|
|
|
def convert(img_rgb, palette_name="bbc", dither_mode="floyd",
|
|
intensive=False, base_color=None):
|
|
conv = mode0.convert(img_rgb, palette_name, dither_mode, intensive,
|
|
base_color=base_color)
|
|
conv.mode = "mono"
|
|
return conv
|