Add python directory of files
This commit is contained in:
parent
dc0dfa9489
commit
0ade526dd1
17
__init__.py
Normal file
17
__init__.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
from PIL import Image
|
||||||
|
import os
|
||||||
|
|
||||||
|
image_path = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
|
|
||||||
|
class Blocks:
|
||||||
|
# A block that should always encode greyscale, where every row of pixels is identical, and the left side is lighter than the right side
|
||||||
|
greyscale = Image.open(image_path + "/blocks/greyscale.png").tobytes("raw", "RGBX")
|
||||||
|
|
||||||
|
# A block that should always encode 3-color when available.
|
||||||
|
# from left to right: red, yellow, yellow, green
|
||||||
|
three_color = Image.open(image_path + "/blocks/3color.png").tobytes("raw", "RGBX")
|
||||||
|
|
||||||
|
# A block that should always encode 3-color with black when available
|
||||||
|
# from left to right: black, red, yellow, green
|
||||||
|
three_color_black = Image.open(image_path + "/blocks/3color black.png").tobytes("raw", "RGBX")
|
Loading…
Reference in New Issue
Block a user