Skip to content
This repository was archived by the owner on May 16, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Adafruit_Thermal.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,11 @@ def printBitmap(self, w, h, bitmap, LaaT=False):
# passing the result to this function.
def printImage(self, image_file, LaaT=False):
from PIL import Image
image = Image.open(image_file)
image = image_file

if isinstance(image_file, str):
image = Image.open(image_file)

if image.mode != '1':
image = image.convert('1')

Expand Down