WriteJPEGToMem is the only JPEG code in the tree (encode only, no decoding),
and libjpeg-turbo came in as an ExternalProject whose imported target passed
its include dir as -isystem. Any other jpeglib.h on the include path (conda,
the distribution, the CUDA directory) could then win, and a build failed with
"Wrong JPEG library version: library is 62, caller expects 80".
stb_image_write v1.16 (commit 31c1ad3) is vendored in preview/stb/ and
compiled into JFJochJPEG.cpp alone with STB_IMAGE_WRITE_STATIC and
STBI_WRITE_NO_STDIO, so no JPEG symbol or header leaves that file. Output is
baseline JPEG (it was progressive); the API is unchanged. Size limits are
checked up front (JPEG's 65535 per side, stb's int pixel index) and an
encoder failure throws JFJochException. Quality is clamped to 1-100. stb
encodes an 18 Mpx frame in ~350 ms against ~210 ms for the scalar
libjpeg-turbo we built; accepted.
Removed: the ExternalProject and JPEG::JPEG target in preview/, nasm from the
Docker images, licenses/libjpeg-turbo.txt and its manifest row, and the CI
check that counted libjpeg-turbo copies in the viewer (the Qt JPEG/TIFF plugin
check stays, as does the viewer's plugin exclusion). Licence: MIT OR
Unlicense, recorded in licenses/ and THIRD_PARTY_NOTICES.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HVeDQqrcrEZy6XBUCMZvyT