do not import matplotlib in brother_ql.reader

This commit is contained in:
Philipp Klaus
2016-11-13 17:13:36 +01:00
parent 7a3c638437
commit 007cc4fd5c
+1 -1
View File
@@ -7,7 +7,6 @@ import sys
from PIL import Image from PIL import Image
import numpy as np import numpy as np
from matplotlib import pyplot as plt
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@@ -280,6 +279,7 @@ class BrotherQLReader(object):
array = np.fliplr(array) array = np.fliplr(array)
im = Image.fromarray(array) im = Image.fromarray(array)
im = im.point(lambda x: 0 if x == 1 else 255, '1') # -> Monocolor and invert im = im.point(lambda x: 0 if x == 1 else 255, '1') # -> Monocolor and invert
#from matplotlib import pyplot as plt
#plt.imshow(im) #plt.imshow(im)
#plt.show() #plt.show()
img_name = 'page{:04d}.png'.format(self.page) img_name = 'page{:04d}.png'.format(self.page)