Skip to content
Snippets Groups Projects
Commit cfed5de9 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Merge branch 'docs' into 'master'

Fix docs

See merge request !41
parents 45d84f97 cd32c65e
Branches
Tags
1 merge request!41Fix docs
Pipeline #61017 passed
......@@ -5,8 +5,6 @@ import h5py
import imageio
import numpy as np
from ..image import to_bob, to_matplotlib
logger = logging.getLogger(__name__)
import os
......@@ -100,6 +98,7 @@ def open_file(filename):
return np.array(f[key])
elif extension in image_extensions:
from ..image import to_bob
img = imageio.imread(filename)
......@@ -143,6 +142,8 @@ def write_file(filename, data, format="pillow"):
f["array"] = data
elif extension in image_extensions:
# Pillow is the format with the best support for all image formats
from ..image import to_matplotlib
imageio.imwrite(filename, to_matplotlib(data), format=format)
else:
raise RuntimeError(f"Unknown file extension: {extension}")
......
......@@ -12,7 +12,16 @@ Functions
---------
.. autosummary::
bob.io.base.load
bob.io.base.save
bob.io.base.create_directories_safe
bob.io.base.load
bob.io.base.vstack_features
bob.io.image.to_matplotlib
bob.io.image.to_bob
bob.io.image.bob_to_pillow
bob.io.image.pillow_to_bob
bob.io.image.opencvbgr_to_bob
bob.io.image.bob_to_opencvbgr
bob.io.image.imshow
.. automodule:: bob.io.base
.. automodule:: bob.io.image
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment