First public commit.
This commit is contained in:
parent
2a48f52979
commit
4bac9d83ed
288 changed files with 18417 additions and 1076 deletions
22
lenser/amiga/convert/mono.py
Normal file
22
lenser/amiga/convert/mono.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
"""Amiga monochrome: 320x200, 16 grey levels (the Amiga has true 16 greys)."""
|
||||
from __future__ import annotations
|
||||
|
||||
from ...convert.base import Conversion
|
||||
from . import _common
|
||||
|
||||
WIDTH, HEIGHT = 320, 200
|
||||
PIXEL_ASPECT = 1.0
|
||||
NCOL = 16
|
||||
|
||||
|
||||
def convert(img_rgb, palette_name="amiga", dither_mode="floyd",
|
||||
intensive=False, base_color=None):
|
||||
planes, colors, preview, err = _common.flat_encode(
|
||||
img_rgb, NCOL, dither_mode, mono=True, base_color=base_color)
|
||||
return Conversion(
|
||||
mode="mono", width=WIDTH, height=HEIGHT, pixel_aspect=PIXEL_ASPECT,
|
||||
index_image=None,
|
||||
data={"planes": planes, "colors": colors, "nplanes": 4, "ham": False},
|
||||
data_addr=0, viewer="amiga", preview_rgb=preview, error=err,
|
||||
meta={"palette": "amiga", "dither": dither_mode},
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue