"Fossies" - the Fresh Open Source Software Archive

Member "scikit-image-0.19.3/skimage/io/_plugins/imageio_plugin.py" (12 Jun 2022, 409 Bytes) of package /linux/misc/scikit-image-0.19.3.tar.gz:

As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "imageio_plugin.py" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 0.19.2_vs_0.19.3.

    1 __all__ = ['imread', 'imsave']
    3 from functools import wraps
    4 import numpy as np
    6 try:
    7     # Try using the v2 API directly to avoid a warning from imageio >= 2.16.2
    8     from imageio.v2 import imread as imageio_imread, imsave
    9 except ImportError:
   10     from imageio import imread as imageio_imread, imsave
   13 @wraps(imageio_imread)
   14 def imread(*args, **kwargs):
   15     return np.asarray(imageio_imread(*args, **kwargs))