I have a directory test/
with images 0.jpg
, and 1.jpg
. How can I use imageio
's mimread
function to specify the directory test
and read both 0
and 1
? Or is this not what it's meant for?
I tried imageio.mimread(uri="/path/to/test/", format=".jpg")
but got the following:
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-43-89a6d166a345> in <module>()
----> 1 imageio.mimread(uri="test", format=".jpg", memtest=True)
/Users/myuser/anaconda/envs/python3/lib/python3.5/site-packages/imageio/core/functions.py in mimread(uri, format, memtest, **kwargs)
279
280 # Get reader
--> 281 reader = read(uri, format, 'I', **kwargs)
282
283 # Read
/Users/myuser/anaconda/envs/python3/lib/python3.5/site-packages/imageio/core/functions.py in get_reader(uri, format, mode, **kwargs)
127
128 # Return its reader object
--> 129 return format.get_reader(request)
130
131
/Users/myuser/anaconda/envs/python3/lib/python3.5/site-packages/imageio/core/format.py in get_reader(self, request)
165 if select_mode not in self.modes:
166 raise RuntimeError('Format %s cannot read in mode %r' %
--> 167 (self.name, select_mode))
168 return self.Reader(self, request)
169
RuntimeError: Format JPEG-PIL cannot read in mode 'I'