imgcodecs: jpeg: add IMWRITE_JPEG_SAMPLING_FACTOR parameter#22064
imgcodecs: jpeg: add IMWRITE_JPEG_SAMPLING_FACTOR parameter#22064alalek merged 5 commits intoopencv:3.4from
Conversation
alalek
left a comment
There was a problem hiding this comment.
Thank you for contribution!
Public API changes are good.
modules/imgcodecs/src/grfmt_jpeg.cpp
Outdated
| // Unknown parameter is set. | ||
| sampling_factor = 0; |
There was a problem hiding this comment.
It makes sense to emit warning here through CV_LOG_WARNING(NULL, "Unknown value for IMWRITE_JPEG_SAMPLING_FACTOR: " << sampling_factor);
There was a problem hiding this comment.
Thank you for your comment, i fixed it.
samples/cpp/imgcodecs_jpeg.cpp
Outdated
| Mat framebuffer = Mat( 160 * 2, 160 * 5, CV_8UC3, cv::Scalar::all(255) ); | ||
|
|
||
| Mat img = Mat( 160, 160, CV_8UC3, cv::Scalar::all(255) ); |
There was a problem hiding this comment.
Mat framebuffer = Mat(...);
No need to copy Mat. Just initialize in ctor: Mat framebuffer(...);
|
Thank you for build and test ! I checked compile log. I think W10/BuildAndTest will become OK if it run again. [OK] W10 / BuildContrib [NG] W10 / BuildAndTest |
|
Thank you for retrying to test. The result of W10/BuildAndTest was success ! |
samples/cpp/imgcodecs_jpeg.cpp
Outdated
| // This file is part of OpenCV project. | ||
| // It is subject to the license terms in the LICENSE file found in the top-level directory | ||
| // of this distribution and at http://opencv.org/license.html | ||
|
|
There was a problem hiding this comment.
We don't have license headers in "samples". Please remove this.
There was a problem hiding this comment.
Thank you for review!! I'm very sorry for the delay in responding. I created a commit to remove those lines.
fix #22052
This merge request contains sample and test program.
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.