Repository navigation
Enable libjpeg-turbo jpeg7 feature to fix IMWRITE_JPEG_LUMA/CHROMA_QUALITY (fixes #1869) - #1872
Merged
Merged
Conversation
…CHROMA_QUALITY warning On Windows and manylinux-full builds, OpenCV uses the vcpkg-provided libjpeg-turbo which defaults to JPEG_LIB_VERSION 62 (libjpeg 6b compat). IMWRITE_JPEG_LUMA/CHROMA_QUALITY require JPEG_LIB_VERSION >= 70. Adding the `jpeg7` vcpkg feature enables WITH_JPEG7=ON, setting JPEG_LIB_VERSION to 70 and making those flags functional. Linux Docker and ARM builds use OpenCV's bundled libjpeg-turbo which already hardcodes JPEG_LIB_VERSION=70, so they are unaffected. Fixes #1869 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
Caution Review failedAn error occurred during the review process. Please try again later. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
4 tasks done
This was referenced Jun 22, 2026
This was referenced Jul 6, 2026
This was referenced Jul 25, 2026
This was referenced Aug 10, 2026
This was referenced Sep 9, 2026
Merged
Merged
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.
Summary
jpeg7feature to thelibjpeg-turbovcpkg dependency so thatJPEG_LIB_VERSIONis 70 on Windows and manylinux-full buildsIMWRITE_JPEG_LUMA/CHROMA_QUALITY are not supported because JPEG_LIB_VERSION < 70ImwriteFlags.JpegLumaQualityandImwriteFlags.JpegChromaQualitynow work as expected on all platformsRoot cause
OpenCV's JPEG support comes from two different sources depending on platform:
JPEG_LIB_VERSIONbeforelibjpeg-turbolibjpeg-turbo3rdparty/libjpeg-turbo/CMakeLists.txt:137)WITH_JPEG=OFFThe vcpkg port for
libjpeg-turboalready exposes ajpeg7feature (-DWITH_JPEG7=ON). This PR opts in to that feature.Notes
jpeg7feature changes the libjpeg ABI (incompatible with libjpeg 6b). Since all libraries are statically linked here, this has no impact on end users.vcpkg.json.Fixes #1869