-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Add multi file backends to imread/imwrite. #1527
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
teamwong111
reviewed
Nov 26, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but with some slight doubt.
- Is it necessary to add some novel unittests for
imwrite
with other file backend? - Shall we refactor test file which looks like not elegant now?
- Shall we impl
exists
function for all File backend before merging this PR?
|
274869388
changed the title
Imageio
[Feature] Add multi file backends to imread/imwrite.
Nov 29, 2021
teamwong111
approved these changes
Nov 29, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
MeowZheng
approved these changes
Dec 3, 2021
zhouzaida
reviewed
Dec 3, 2021
zhouzaida
reviewed
Dec 3, 2021
zhouzaida
reviewed
Dec 3, 2021
zhouzaida
reviewed
Dec 3, 2021
zhouzaida
reviewed
Dec 3, 2021
zhouzaida
reviewed
Dec 6, 2021
zhouzaida
reviewed
Dec 6, 2021
zhouzaida
reviewed
Dec 6, 2021
zhouzaida
reviewed
Dec 6, 2021
zhouzaida
reviewed
Dec 7, 2021
zhouzaida
approved these changes
Dec 7, 2021
zhouzaida
reviewed
Dec 11, 2021
zhouzaida
reviewed
Dec 14, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
The motivation of the PR is to read image from different file backends and write image to different file backends but do not need to modify the existing interface.
It includes two parts:
FileClient
to image io function to support different file backends.tests/test_image/test_io.py
.Modification
imread
file_client_args
to load which makes it support loading object from different file backends, but the parameter is optionalFileClient
to read image bytes of different file backends and useimfrombytes
to decode image.tifffile
backends toimfrombytes
.imwrite
file_client_args
to load which makes it support loading object from different file backends, but the parameter is optionalcv2.imencode
to encode image and useFileClient
to write image bytes to different file backends.test_io.py
MagicMock
to testimread
andimwrite
.BC-breaking (Optional)
No
Use cases (Optional)
Test
Checklist
Before PR:
After PR: