Test for in-memory animation encoding and decoding#27013
Merged
asmorkalov merged 2 commits intoopencv:4.xfrom Mar 12, 2025
Merged
Test for in-memory animation encoding and decoding#27013asmorkalov merged 2 commits intoopencv:4.xfrom
asmorkalov merged 2 commits intoopencv:4.xfrom
Conversation
6ce5bcd to
cea80c7
Compare
Contributor
|
imho this will be better ( no need to TEST(Imgcodecs_APNG, imdecode_animation) ) |
6 tasks
Contributor
Author
|
@mshabunin @vrabaud What is your opinion? I propose to have 2 tests: decoding only, encoding+decoding. It allows easily triage the issue in case of test failure. |
cea80c7 to
66ec644
Compare
mshabunin
reviewed
Mar 11, 2025
|
|
||
| @return Returns true if the animation was successfully encoded; returns false otherwise. | ||
| */ | ||
| CV_EXPORTS_W bool imencodeanimation(const String& ext, const Animation& animation, CV_OUT std::vector<uchar>& buf, const std::vector<int>& params = std::vector<int>()); |
Contributor
There was a problem hiding this comment.
I believe buf should be of type OutputArray. Or not?
Contributor
Author
There was a problem hiding this comment.
All analogs use std::vector:
- imdecode: https://docs.opencv.org/4.x/d4/da8/group__imgcodecs.html#ga4e9883ae1f619bcbe875b7038520ea78
- indecodemulti: https://docs.opencv.org/4.x/d4/da8/group__imgcodecs.html#ga913e55d27f30e7b56f40eddc09fccb76
Most probably, they call std::vector::resize() to fit encoded size. It's not available throw OutputArray interface.
sturkmen72
reviewed
Mar 11, 2025
66ec644 to
dbf877c
Compare
mshabunin
approved these changes
Mar 12, 2025
This file contains hidden or 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
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.
Tests for #26964
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.