Skip to content

support use memory buffer as input to read multi-page image#21966

Merged
asmorkalov merged 3 commits intoopencv:4.xfrom
Harvey-Huang:Unicode_Path
Oct 11, 2022
Merged

support use memory buffer as input to read multi-page image#21966
asmorkalov merged 3 commits intoopencv:4.xfrom
Harvey-Huang:Unicode_Path

Conversation

@Harvey-Huang
Copy link
Copy Markdown
Contributor

@Harvey-Huang Harvey-Huang commented May 11, 2022

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@Harvey-Huang
Copy link
Copy Markdown
Contributor Author

The imreadmulti method only supports std::string as an input, and the file path(std::string) is not support Unicode, imread is not support Unicode file path too, but I can use imdecode which allow to decode image using memory buffer as input.

@asmorkalov
Copy link
Copy Markdown
Contributor

Thanks a lot for contribution. Please add tests for the new API. Please take a look on existing tests for imreadmulti as reference.

@asmorkalov asmorkalov added category: imgcodecs pr: needs test New functionality requires minimal tests set and removed pr: needs test New functionality requires minimal tests set labels May 11, 2022
Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@asmorkalov asmorkalov added this to the 4.7.0 milestone Sep 19, 2022
@Harvey-Huang
Copy link
Copy Markdown
Contributor Author

Hi Asmorkalov and Alalek, thanks for the comments and code changed, I just saw this item update today, I forgot to remove the temporary file.

@vpisarev
Copy link
Copy Markdown
Contributor

I have no showstopper complains about this PR, I just wonder if we can rework this patch to use the newly introduced ImageCollection API?

@asmorkalov
Copy link
Copy Markdown
Contributor

New API with iterators can be extended to support in memory processing, but not re-used. I propose to merge the patch to have consistent API ans then extend iterators approach.

@asmorkalov asmorkalov merged commit 8b0aa6a into opencv:4.x Oct 11, 2022
@alalek alalek mentioned this pull request Jan 8, 2023
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
Support use memory buffer to read multi-page image
@Harvey-Huang Harvey-Huang deleted the Unicode_Path branch November 27, 2023 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants