DrKLO/Telegram · error
%s: sorry, multi-scan output was not compiled
Error message
%s: sorry, multi-scan output was not compiled
What it means
The -scans flag (multi-scan output script) was passed but the build lacks C_MULTISCAN_FILES_SUPPORTED. jpegtran exits with failure at parse time; the scan script file is never read.
Source
Thrown at TMessagesProj/jni/mozjpeg/jpegtran.c:366
else if (keymatch(argv[argn], "180", 3))
select_transform(JXFORM_ROT_180);
else if (keymatch(argv[argn], "270", 3))
select_transform(JXFORM_ROT_270);
else
usage();
prefer_smallest = FALSE;
} else if (keymatch(arg, "scans", 1)) {
/* Set scan script. */
#ifdef C_MULTISCAN_FILES_SUPPORTED
if (++argn >= argc) /* advance to next argument */
usage();
prefer_smallest = FALSE;
scansarg = argv[argn];
/* We must postpone reading the file in case -progressive appears. */
#else
fprintf(stderr, "%s: sorry, multi-scan output was not compiled\n",
progname);
exit(EXIT_FAILURE);
#endif
} else if (keymatch(arg, "transpose", 1)) {
/* Transpose (across UL-to-LR axis). */
select_transform(JXFORM_TRANSPOSE);
prefer_smallest = FALSE;
} else if (keymatch(arg, "transverse", 6)) {
/* Transverse transpose (across UR-to-LL axis). */
select_transform(JXFORM_TRANSVERSE);
prefer_smallest = FALSE;
} else if (keymatch(arg, "trim", 3)) {
/* Trim off any partial edge MCUs that the transform can't handle. */
transformoption.trim = TRUE;
prefer_smallest = FALSE;View on GitHub (pinned to 45ab8f4308)
Solutions
- Remove -scans and accept default scan layout.
- Rebuild with C_MULTISCAN_FILES_SUPPORTED defined (default on for full libjpeg-turbo/mozjpeg; check jpegparam.h and CMake).
- Probe for the feature at build time and conditionally enable scan scripts.
- Note -progressive also depends on this feature; if -scans fails, -progressive likely will too.
Example fix
# before ./jpegtran -scans script.txt in.jpg > out.jpg # after ./jpegtran in.jpg > out.jpg # or rebuild with C_MULTISCAN_FILES_SUPPORTED
Defensive patterns
Strategy: type-guard
Type guard
#ifndef C_MULTISCAN_FILES_SUPPORTED #error "multi-scan output unavailable; do not pass -scans" #endif
Prevention
- Probe for C_MULTISCAN_FILES_SUPPORTED; -progressive depends on it too.
- Rebuild with multi-scan support if scan scripts are needed.
- Drop -scans on baseline-only builds.
When it happens
Trigger: Passing -scans <file> on a libjpeg/mozjpeg build compiled without multi-scan support. Baseline-only or single-scan builds reject this option.
Common situations: Embedded/baseline-only libjpeg builds, size-constrained distributions, or misconfigured CMake. Command examples using -scans or -progressive fail identically on these builds.
Related errors
- %s: sorry, multi-scan output was not compiled in
- %s: sorry, image transformation was not compiled
- %s: sorry, arithmetic coding not supported
- %s: sorry, entropy optimization was not compiled
- %s: sorry, progressive output was not compiled
AI-assisted analysis of DrKLO/Telegram@45ab8f4308 (2026-08-14).
Data as JSON: /api/errors/b56c6b5fc27cfe5a.
Report an issue: GitHub.