summaryrefslogtreecommitdiffstats
path: root/test/testroutines.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/testroutines.py')
-rw-r--r--test/testroutines.py9
1 files changed, 8 insertions, 1 deletions
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):