do not import matplotlib in brother_ql.reader
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user