Load data files relative to script path
This commit is contained in:
parent
a2b67ba882
commit
ccbb6980d9
|
@ -13,7 +13,9 @@ import image as image_py
|
||||||
def convert(screen, rgb: np.ndarray, args):
|
def convert(screen, rgb: np.ndarray, args):
|
||||||
# Conversion matrix from RGB to CAM16UCS colour values. Indexed by
|
# Conversion matrix from RGB to CAM16UCS colour values. Indexed by
|
||||||
# 24-bit RGB value
|
# 24-bit RGB value
|
||||||
rgb24_to_cam16ucs = np.load("data/rgb24_to_cam16ucs.npy")
|
base_dir = os.path.dirname(__file__)
|
||||||
|
rgb24_to_cam16ucs = np.load(
|
||||||
|
os.path.join(base_dir, "data/rgb24_to_cam16ucs.npy"))
|
||||||
|
|
||||||
dither = dither_pattern.PATTERNS[args.dither]()
|
dither = dither_pattern.PATTERNS[args.dither]()
|
||||||
bitmap = dither_dhr_pyx.dither_image(
|
bitmap = dither_dhr_pyx.dither_image(
|
||||||
|
|
|
@ -358,8 +358,11 @@ class ClusterPalette:
|
||||||
def convert(screen, rgb: np.ndarray, args):
|
def convert(screen, rgb: np.ndarray, args):
|
||||||
# Conversion matrix from RGB to CAM16UCS colour values. Indexed by
|
# Conversion matrix from RGB to CAM16UCS colour values. Indexed by
|
||||||
# 24-bit RGB value
|
# 24-bit RGB value
|
||||||
rgb24_to_cam16ucs = np.load("data/rgb24_to_cam16ucs.npy")
|
base_dir = os.path.dirname(__file__)
|
||||||
rgb12_iigs_to_cam16ucs = np.load("data/rgb12_iigs_to_cam16ucs.npy")
|
rgb24_to_cam16ucs = np.load(
|
||||||
|
os.path.join(base_dir, "data/rgb24_to_cam16ucs.npy"))
|
||||||
|
rgb12_iigs_to_cam16ucs = np.load(
|
||||||
|
os.path.join(base_dir, "data/rgb12_iigs_to_cam16ucs.npy"))
|
||||||
|
|
||||||
# TODO: flags
|
# TODO: flags
|
||||||
inner_iterations = 10
|
inner_iterations = 10
|
||||||
|
|
Loading…
Reference in New Issue