added img_to_bytearray.py script and updated the readme accordingly
img_to_bytearray.py
Convert an image to a Python bytearray bitmap that can be used with the bitmap function. Resizes images to fit on the 536x240 display of the RM67162 without changing the aspect ratio. Be sure to install Pillow before running this script.
positional arguments:
image_path Path to the input image.
output_file (optional) Path to the output .py file. Defaults to the same path as input image with .py extension.
options:
-h, --help show this help message and exit
-w WIDTH, --width WIDTH
Target width for the image. Default is 536.
-ht HEIGHT, --height HEIGHT
Target height for the image. Default is 240.
-d [CONVERTED_IMAGE_PATH], -debug [CONVERTED_IMAGE_PATH]
Path to save the resized image for debugging purposes. If no path is provided, the converted image will be saved as {input}_conv.png.
added img_to_bytearray.py script and updated the readme accordingly
img_to_bytearray.py
Convert an image to a Python bytearray bitmap that can be used with the
bitmap
function. Resizes images to fit on the 536x240 display of the RM67162 without changing the aspect ratio. Be sure to install Pillow before running this script.positional arguments:
image_path
Path to the input image.output_file
(optional) Path to the output .py file. Defaults to the same path as input image with .py extension.options:
-h, --help
show this help message and exit-w WIDTH, --width WIDTH
Target width for the image. Default is 536.-ht HEIGHT, --height HEIGHT
Target height for the image. Default is 240.-d [CONVERTED_IMAGE_PATH], -debug [CONVERTED_IMAGE_PATH]
Path to save the resized image for debugging purposes. If no path is provided, the converted image will be saved as {input}_conv.png.