help()
function.imread()
- read an image from the specified urimimread()
- read a series of images from the specified urivolread()
- read a volume from the specified urimvolread()
- read a series of volumes from the specified uriimwrite()
- write an image to the specified urimimwrite()
- write a series of images to the specified urivolwrite()
- write a volume to the specified urimvolwrite()
- write a series of volumes to the specified uriget_reader()
and get_writer()
. They respectively return anReader
and an Writer
object, which canbe used to read/write data and meta data in a more controlled manner.This also allows specific scientific formats to be exposed in a waythat best suits that file-format.meta
attribute; the meta-data dictionary can be accessed with im.meta
.To make this work, imageio actually makes use of a subclass ofnp.ndarray
. If needed, the image can be converted to a plain numpyarray using np.asarray(im)
.'c:foobar.png'
'c:foobar.zipeggs.png'
read()
/ write()
method.'http://example.com/foo.png'
get_reader('<video0>')
to grab images from a (web) camera.imread('<screen>')
to grab a screenshot (on Windows or OS X).imread('<clipboard>')
to grab an image from the clipboard (on Windows).'<bytes>'
or imageio.RETURN_BYTES
tomake a write function return the bytes instead of writing to a file.imageio.imread(imageio.core.urlopen(url).read(),'.gif')
.imageio.
help
(name=None)¶Parameters: |
|
---|
imageio.
show_formats
()¶imageio.
imread
(uri, format=None, **kwargs)¶Parameters: |
|
---|
imageio.
imwrite
(uri, im, format=None, **kwargs)¶Parameters: |
|
---|
imageio.
mimread
(uri, format=None, memtest='256MB', **kwargs)¶Parameters: |
|
---|
imageio.
mimwrite
(uri, ims, format=None, **kwargs)¶Parameters: |
|
---|
imageio.
volread
(uri, format=None, **kwargs)¶Parameters: |
|
---|
imageio.
volwrite
(uri, vol, format=None, **kwargs)¶Parameters: |
|
---|
imageio.
mvolread
(uri, format=None, memtest='1GB', **kwargs)¶Parameters: |
|
---|
imageio.
mvolwrite
(uri, vols, format=None, **kwargs)¶Parameters: |
|
---|
imageio.
get_reader
(uri, format=None, mode='?', **kwargs)¶Reader
object which can be used to read dataand meta data from the specified file.Parameters: |
|
---|
imageio.
get_writer
(uri, format=None, mode='?', **kwargs)¶Writer
object which can be used to write dataand meta data to the specified file.Parameters: |
|
---|
imageio.core.format.
Reader
(format, request)¶get_reader()
.Attributes: |
|
---|
close
()¶closed
¶format
¶Format
object corresponding to the currentread/write operation.get_data
(index, **kwargs)¶get_length
()¶len(reader_object)
.)get_meta_data
(index=None)¶get_data
also provides the meta data for the returnedimage as an atrribute of that image.get_next_data
(**kwargs)¶iter_data
()¶request
¶Request
object corresponding to thecurrent read/write operation.set_image_index
(index)¶imageio.core.format.
Writer
(format, request)¶get_writer()
.Attributes: |
|
---|
append_data
(im, meta={})¶close
()¶closed
¶format
¶Format
object corresponding to the currentread/write operation.request
¶Request
object corresponding to thecurrent read/write operation.set_meta_data
(meta)¶