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 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")