From 5db192751f5e13b96292aba5219e43764bd01a25 Mon Sep 17 00:00:00 2001 From: Thomas van den Berg Date: Wed, 27 Feb 2013 23:17:56 +0100 Subject: [PATCH] remove import PIL --- escpos/escpos.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/escpos/escpos.py b/escpos/escpos.py index caf4ef3..512a99e 100644 --- a/escpos/escpos.py +++ b/escpos/escpos.py @@ -7,7 +7,6 @@ ''' import Image -import PIL.Image import time import os import operator @@ -55,7 +54,7 @@ class Escpos: def fullimage(self, img, max_height=860, width=512, histeq=True): """ Resizes and prints an arbitrarily sized image """ - if isinstance(img, (Image.Image, PIL.Image.Image)): + if isinstance(img, Image.Image): im = img.convert("RGB") else: im = Image.open(img).convert("RGB") @@ -99,7 +98,7 @@ class Escpos: switch = 0 img_size = [ 0, 0 ] - if isinstance(img, (Image.Image, PIL.Image.Image)): + if isinstance(img, Image.Image): im = img.convert("RGB") else: im = Image.open(img).convert("RGB")