remove import PIL

This commit is contained in:
Thomas van den Berg 2013-02-27 23:17:56 +01:00
parent b4f8de002c
commit 5db192751f
1 changed files with 2 additions and 3 deletions

View File

@ -7,7 +7,6 @@
''' '''
import Image import Image
import PIL.Image
import time import time
import os import os
import operator import operator
@ -55,7 +54,7 @@ class Escpos:
def fullimage(self, img, max_height=860, width=512, histeq=True): def fullimage(self, img, max_height=860, width=512, histeq=True):
""" Resizes and prints an arbitrarily sized image """ """ Resizes and prints an arbitrarily sized image """
if isinstance(img, (Image.Image, PIL.Image.Image)): if isinstance(img, Image.Image):
im = img.convert("RGB") im = img.convert("RGB")
else: else:
im = Image.open(img).convert("RGB") im = Image.open(img).convert("RGB")
@ -99,7 +98,7 @@ class Escpos:
switch = 0 switch = 0
img_size = [ 0, 0 ] img_size = [ 0, 0 ]
if isinstance(img, (Image.Image, PIL.Image.Image)): if isinstance(img, Image.Image):
im = img.convert("RGB") im = img.convert("RGB")
else: else:
im = Image.open(img).convert("RGB") im = Image.open(img).convert("RGB")