From a532c5efb8f20a8eb400fdad0edc00dad50a5c46 Mon Sep 17 00:00:00 2001 From: Daniil Kazantsev Date: Sun, 2 Jun 2019 13:35:52 +0100 Subject: tests run without pillow --- test/testroutines.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'test/testroutines.py') diff --git a/test/testroutines.py b/test/testroutines.py index 8da5c5e..64e56e3 100644 --- a/test/testroutines.py +++ b/test/testroutines.py @@ -1,10 +1,17 @@ import numpy as np -from PIL import Image +#from PIL import Image +""" class TiffReader(object): def imread(self, filename): return np.asarray(Image.open(filename)) +""" +class BinReader(object): + def imread(self, filename): + w, h = 512, 512 + with open(filename, mode='rb') as f: + return np.fromfile(f,dtype=np.uint8,count=w*h).reshape(h,w) ############################################################################### def printParametersToString(pars): -- cgit v1.2.3