Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.io.base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.io.base
Commits
cfed5de9
Commit
cfed5de9
authored
3 years ago
by
Amir MOHAMMADI
Browse files
Options
Downloads
Plain Diff
Merge branch 'docs' into 'master'
Fix docs See merge request
!41
parents
45d84f97
cd32c65e
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!41
Fix docs
Pipeline
#61017
passed
3 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/io/base/__init__.py
+3
-2
3 additions, 2 deletions
bob/io/base/__init__.py
doc/py_api.rst
+11
-2
11 additions, 2 deletions
doc/py_api.rst
with
14 additions
and
4 deletions
bob/io/base/__init__.py
+
3
−
2
View file @
cfed5de9
...
...
@@ -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
}
"
)
...
...
This diff is collapsed.
Click to expand it.
doc/py_api.rst
+
11
−
2
View file @
cfed5de9
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment