mirror of
https://github.com/KrisKennaway/ii-pix.git
synced 2025-08-05 01:27:57 +00:00
Whitespace
This commit is contained in:
@@ -10,15 +10,15 @@ import screen as screen_py
|
|||||||
import image as image_py
|
import image as image_py
|
||||||
|
|
||||||
|
|
||||||
def _output(out_image: Image, args):
|
def _output(out_image: Image, args):
|
||||||
if args.show_output:
|
if args.show_output:
|
||||||
out_image.show()
|
out_image.show()
|
||||||
|
|
||||||
if args.save_preview:
|
if args.save_preview:
|
||||||
# Save Double hi-res image
|
# Save Double hi-res image
|
||||||
outfile = os.path.join(
|
outfile = os.path.join(
|
||||||
os.path.splitext(args.output)[0] + "-preview.png")
|
os.path.splitext(args.output)[0] + "-preview.png")
|
||||||
out_image.save(outfile, "PNG")
|
out_image.save(outfile, "PNG")
|
||||||
|
|
||||||
|
|
||||||
def _write(screen: screen_py.DHGRScreen, bitmap: np.ndarray, args):
|
def _write(screen: screen_py.DHGRScreen, bitmap: np.ndarray, args):
|
||||||
@@ -57,6 +57,7 @@ def convert(screen: screen_py.DHGRNTSCScreen, image: Image, args):
|
|||||||
_output(out_image, args)
|
_output(out_image, args)
|
||||||
_write(screen, bitmap, args)
|
_write(screen, bitmap, args)
|
||||||
|
|
||||||
|
|
||||||
def convert_mono(screen: screen_py.DHGRScreen, image: Image, args):
|
def convert_mono(screen: screen_py.DHGRScreen, image: Image, args):
|
||||||
image = image.convert("1")
|
image = image.convert("1")
|
||||||
|
|
||||||
|
1
image.py
1
image.py
@@ -46,5 +46,6 @@ def resize(
|
|||||||
else:
|
else:
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
def resize_mono(image: Image, x_res, y_res) -> Image:
|
def resize_mono(image: Image, x_res, y_res) -> Image:
|
||||||
return image.resize((x_res, y_res), Image.LANCZOS)
|
return image.resize((x_res, y_res), Image.LANCZOS)
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
"""Representation of Apple II screen memory."""
|
"""Representation of Apple II screen memory."""
|
||||||
|
|
||||||
import math
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import palette as palette_py
|
import palette as palette_py
|
||||||
|
|
||||||
@@ -111,6 +110,7 @@ class DHGRScreen:
|
|||||||
self.main[addr:addr + 40] = main_col[y, :]
|
self.main[addr:addr + 40] = main_col[y, :]
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
class DHGRNTSCScreen(DHGRScreen):
|
class DHGRNTSCScreen(DHGRScreen):
|
||||||
def __init__(self, palette: palette_py.Palette):
|
def __init__(self, palette: palette_py.Palette):
|
||||||
self.palette = palette
|
self.palette = palette
|
||||||
|
Reference in New Issue
Block a user